QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#323187#4833. Tetra-puzzlehotboy27030 925ms3944kbC++148.4kb2024-02-08 19:52:362024-02-08 19:52:37

Judging History

你现在查看的是最新测评结果

  • [2024-02-08 19:52:37]
  • 评测
  • 测评结果:0
  • 用时:925ms
  • 内存:3944kb
  • [2024-02-08 19:52:36]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define pll pair <ll,ll>
#define fi first
#define se second
#define sz(a) (ll((a).size()))
#define MASK(i) (1LL<<(i))
#define BIT(mask,i) (((mask) >> (i))&1LL)
string best_move = "TLZOI";
const ll INF = 1e9;
pll piece[][4]={
{{0,0},{1,0},{-1,0},{0,-1}},
{{0,0},{0,1},{0,2},{1,0}},
{{0,0},{0,1},{-1,1},{1,0}},
{{0,0},{0,1},{1,0},{1,1}},
{{0,0},{0,1},{0,2},{0,3}},
};
ll penalty[5][5];
void cv_to_board(ll state,ll board[5][5]){

    ll ptr = 0;
    for (ll i = 0;i < 5;i ++){
        for (ll j = 0;j < 5;j ++,ptr++){
            board[i][j] = BIT(state,ptr);
        }
    }
}
ll to_state(ll board[5][5]){
    ll res = 0;
    ll ptr = 0;
    for (ll i = 0;i < 5;i ++){
        for (ll j = 0;j < 5;j ++,ptr++){
            res ^= board[i][j]*MASK(ptr);
        }
    }
    return res;
}
ll mx[] = {0,0,1,-1};
ll my[] = {-1,1,0,0};
ll evaluate(ll state){
    if (state<0)return INF;
    ll board[5][5];
    ll res = 0;
    cv_to_board(state,board);
    for (ll i = 0;i < 5;i ++){
        for (ll j = 0;j < 5;j ++){
            res += penalty[i][j] * board[i][j];
        }
    }

    auto valid = [&](pll pnt){
        if (pnt.fi >= 0 && pnt.fi<5 && pnt.se >= 0 && pnt.se<5 && board[pnt.fi][pnt.se]==0)return 1;
        else return 0;
    };
    ll holes = 1;
    for (ll i = 0;i < 5;i ++){
        for (ll j = 0;j < 5;j ++){
            if (board[i][j]==0){
                holes++;
                queue <pll> q;
                q.push({i,j});
                board[i][j] = 1;
                while (!q.empty()){
                    pll u = q.front();
                    q.pop();
                    for (ll k = 0;k < 4;k ++){
                        pll nw = {u.fi+mx[k],u.se+my[k]};
                        if (valid(nw)){
                            q.push(nw);
                            board[nw.fi][nw.se] = 1;
                        }
                    }
                }
            }
        }
    }
    return res*holes;
}
void print_move(ll cur_state,ll nxt_state){
    ll ptr = 0;
    for (ll i = 0;i < 5;i ++){
        for (ll j = 0;j < 5;j ++,ptr++){
            if (BIT(nxt_state,ptr)){
                if (BIT(cur_state,ptr)){
                    cout<<'#';
                }
                else{
                    cout<<'*';
                }
            }
            else{
                cout<<'.';
            }
        }
        cout<<endl;
    }
}
void print_state(ll state){
    ll board[5][5];
    cv_to_board(state,board);
    for (ll i = 0;i < 5;i ++){
        for (ll j = 0;j < 5;j ++){
            cout<<board[i][j];
        }
        cout<<endl;
    }
}
ll f_clear(ll state){
    ll board[5][5];
    cv_to_board(state,board);
    ll row[5]={},col[5]={};
    for (ll i = 0;i < 5;i ++)col[i] = row[i] = 1;
    for (ll i = 0;i < 5;i ++){
        for (ll j = 0;j < 5;j ++){
            col[j] &= board[i][j];
            row[i] &= board[i][j];
        }
    }
    for (ll i = 0;i < 5;i ++){
        for (ll j = 0;j < 5;j ++){
            if (col[j] || row[i])board[i][j] = 0;
        }
    }
    return to_state(board);
}
vector <pll> all_move(ll state,ll type){
    ll board[5][5];
    vector <pll> ans_move;
    cv_to_board(state,board);
    auto valid = [&](pll pnt){
        if (pnt.fi >= 0 && pnt.fi<5 && pnt.se >= 0 && pnt.se<5 && board[pnt.fi][pnt.se]==0)return 1;
        else return 0;
    };
    for (ll flip = 0;flip <= 1;flip++){
        for (ll rot = 0;rot < 4;rot++){
            vector <pll> cur_piece;
            for (ll i = 0;i < 4;i ++){
                pll cur = piece[type][i];
                if (flip){
                    cur.fi = -cur.fi;
                }
                for (ll j = 0;j < rot;j ++){
                    ll x = cur.fi,y = cur.se;
                    cur.fi = y;
                    cur.se = -x;
                }
                cur_piece.push_back(cur);
            }
            for (ll i = 0;i < 5;i ++){
                for (ll j = 0;j < 5;j ++){
                    bool ok = 1;
                    for (ll k = 0;k < 4;k ++){
                        pll cur = cur_piece[k];
                        ok &= valid({cur.fi+i,cur.se+j});
                    }
                    if (ok){
                        for (ll k = 0;k < 4;k ++){
                            pll cur = cur_piece[k];
                            board[cur.fi+i][cur.se+j] = 1;
                        }
                        ll nxt_state = to_state(board);
                        ll end_state = f_clear(nxt_state);
                        ans_move.push_back({nxt_state,end_state});
                        for (ll k = 0;k < 4;k ++){
                            pll cur = cur_piece[k];
                            board[cur.fi+i][cur.se+j] = 0;
                        }
                    }
                }
            }
        }
    }
    return ans_move;
}
pll greedy(ll cur_state,ll type){
    vector <pll> choices = all_move(cur_state,type);
    ll ans_eval = INF;
    pll ans = {-1,-1};
    for (auto x:choices){
        ll val = evaluate(x.se);
        if (val < ans_eval){
            ans = x;
            ans_eval = val;
        }
    }
    return ans;
}
ll DEPTH = 4;
ll plan_ahead(ll cur_state,string coming){
    for (auto x:coming){
        ll type = 0;
        for (ll k = 0;k < sz(best_move);k ++){
            if (best_move[k] == x){type = k;break;}
        }
        cur_state = greedy(cur_state,type).se;
        if (evaluate(cur_state)==INF){
            return cur_state;
        }
    }
    return cur_state;
}
int main(){
    ios_base::sync_with_stdio(0);cin.tie(nullptr);cout.tie(nullptr);
    string task;
    cin>>task;
    ll ptr = 0;
    for (ll i = 0;i < 5;i ++){
        for (ll j = 0;j < 5;j ++,ptr++){
            ll dist_i = min(abs(i-0),abs(i-4));
            ll dist_j = min(abs(j-0),abs(j-4));
            penalty[i][j] = MASK(dist_i+dist_j);
//            cout<<penalty[i][j]<<' ';
        }
//        cout<<endl;
    }
    if (task == "prepare"){
        ll n;
        cin>>n;
        ll cur_state = 0;
        vector <string> s(n);
        for (auto &x:s)cin>>x;
        for (ll i = 0;i < n;i ++){
            string cur;
            ll best_eval[2];
            best_eval[0] = best_eval[1] = INF;
            function<void(int)> backtrack = [&](int t){
                if(t==n || t == i+DEPTH){
                    ll cur_eval = evaluate(plan_ahead(cur_state,cur));
                    for (ll j = 0;j < 2;j ++)if (cur[0]==s[i][j])best_eval[j] = min(best_eval[j],cur_eval);
                    return;
                }
                for (ll j = 0;j < 2;j ++){
                    cur.push_back(s[t][j]);
                    backtrack(t+1);
                    cur.pop_back();
                }
            };
            backtrack(i);
            ll type[2];
            for (ll j = 0;j < 2;j ++){
                for (ll k = 0;k < sz(best_move);k ++){
                    if (best_move[k] == s[i][j]){type[j] = k;break;}
                }
            }
            pll ans0 = greedy(cur_state,type[0]);
            pll ans1 = greedy(cur_state,type[1]);
//            cout<<"PENDING "<<s[i]<<endl;
            char choose = s[i][0];
            cur_state = ans0.se;
//            cout<<"EVAL "<<best_eval[0]<<' '<<best_eval[1]<<'\n';
            if (best_eval[0]>best_eval[1]){choose = s[i][1];cur_state=ans1.se;}
            if (evaluate(cur_state)==INF)assert(0);
//            cout<<evaluate(cur_state)<<endl;
//            print_state(cur_state);
            cout<<choose;
        }
    }
    else{
        ll n;
        cin>>n;
        ll cur_state = 0;
        while (n--){
            char x;
            cin>>x;
            ll type;
            for (ll i = 0;i < 5;i ++){
                if (x==best_move[i]){
                    type = i;
                    break;
                }
            }
            pll ans=greedy(cur_state,type);
            print_move(cur_state,ans.fi);
            cur_state = ans.se;
//            print_state(cur_state);
        }
    }
}
// 7 10 3 9 8 9 10 11
/*
prepare
88
ZL OL OT IT LO ZL OI ZT TO OI OL OL LZ ZT TL TZ IO ZL TZ TO IL LO ZT OL LT ZI TZ IL LT ZL OT TI ZO ZO ZT OZ TL TL LO OI TO OZ LI ZO ZT ZT IO IZ OZ ZO ZI ZO IO IO TI OL IL IT IL TL TL ZL IT IT ZO IO OL IL ZI TO OL IL ZI LZ LT IL LI ZO IL TL IT LI ZI OL TO OZ IZ OZ
*/

詳細信息

Test #1:

score: 100
Accepted
time: 5ms
memory: 3840kb

First Run Input

prepare
6
TO LO ZI LI LT LT

First Run Output

TLIITL

Second Run Input

play
6
T
L
I
I
T
L

Second Run Output

....*
...**
....*
.....
.....
*...#
***##
....#
.....
.....
#...#
.....
****#
.....
.....
#...#
*....
*....
*....
*....
....#
.....
....*
...**
....*
....#
.....
....#
***##
*...#

result:

ok good job!

Test #2:

score: 100
Accepted
time: 0ms
memory: 3900kb

First Run Input

prepare
1
ZI

First Run Output

I

Second Run Input

play
1
I

Second Run Output

****.
.....
.....
.....
.....

result:

ok good job!

Test #3:

score: 100
Accepted
time: 5ms
memory: 3604kb

First Run Input

prepare
10
LO TZ ZO OI OL ZL ZO TL OZ LO

First Run Output

OTZOLZZLZL

Second Run Input

play
10
O
T
Z
O
L
Z
Z
L
Z
L

Second Run Output

**...
**...
.....
.....
.....
##...
##...
.*...
**...
.*...
#...*
#..**
...*.
#....
.....
#**.#
#**##
...#.
#....
.....
###*#
.***.
...#.
#....
.....
.....
.###.
...#.
#.**.
...**
.....
*###.
**.#.
#*##.
...##
...**
####*
##.#*
####.
...##
....#
.....
##**#
###**
....#
....#
...**
....*
....*
....#

result:

ok good job!

Test #4:

score: 100
Accepted
time: 24ms
memory: 3668kb

First Run Input

prepare
29
ZT OT ZL LT ZI LO IZ LT OI ZT ZT OL ZI LT LZ TZ IL ZI OT LZ LT LZ OT OI IO OZ IZ ZL ZL

First Run Output

TTZLZLILIZZOZTLTIZTLLZTOOOILL

Second Run Input

play
29
T
T
Z
L
Z
L
I
L
I
Z
Z
O
Z
T
L
T
I
Z
T
L
L
Z
T
O
O
O
I
L
L

Second Run Output

....*
...**
....*
.....
.....
.*..#
***##
....#
.....
.....
.#**#
...**
....#
.....
.....
*####
***##
....#
.....
.....
....*
...**
...*#
.....
.....
....#
...##
***##
*....
.....
....#
...##
.....
#****
.....
*...#
***##
.....
.....
.....
#...#
*....
*....
*....
*....
..**#
...**
.....
.....
.....
...

result:

ok good job!

Test #5:

score: 100
Accepted
time: 23ms
memory: 3580kb

First Run Input

prepare
36
TI ZT IT IT OT OZ IL TZ ZO LO LZ ZL OT ZI IL OT OT ZI ZT TZ TI LT LO OL IL OL IZ OZ OL ZL LT IO ZO ZL ZO LT

First Run Output

TTIITOLTZOLLTILOTIZTTLOLLLIOLZLIOLZL

Second Run Input

play
36
T
T
I
I
T
O
L
T
Z
O
L
L
T
I
L
O
T
I
Z
T
T
L
O
L
L
L
I
O
L
Z
L
I
O
L
Z
L

Second Run Output

....*
...**
....*
.....
.....
.*..#
***##
....#
.....
.....
.#..#
.....
****#
.....
.....
.#..#
.*...
.*...
.*...
.*...
....#
.....
....*
...**
....*
**..#
**...
....#
...##
....#
##*.#
##***
....#
...##
....#
###..
.....
.....
.*.#.
***..
###..
.*...
**...
*#.#.
###..
#.#**
...**
#....
#..#.
#.#..
...

result:

ok good job!

Test #6:

score: 100
Accepted
time: 47ms
memory: 3672kb

First Run Input

prepare
57
LT OI TL IZ OT TL LT TI LO LT LO LO OL IO LI IT TZ TZ IO ZT TI OT OI TL TL ZT TZ OL OI LI OZ ZI TO LZ IO IO LT OZ TO OZ IZ TZ LT ZO TO TZ OT LT ZO OL IL LO ZT OZ OL IL ZI

First Run Output

TITZOLTIOTLLOIIITTITIOITLTTLILZITLIOLZTOITLZOTOLZLIOZZLLI

Second Run Input

play
57
T
I
T
Z
O
L
T
I
O
T
L
L
O
I
I
I
T
T
I
T
I
O
I
T
L
T
T
L
I
L
Z
I
T
L
I
O
L
Z
T
O
I
T
L
Z
O
T
O
L
Z
L
I
O
Z
Z
L
L
I

Second Run Output

....*
...**
....*
.....
.....
....#
...##
****#
.....
.....
.*..#
***##
.....
.....
.....
.#**#
...**
.....
.....
.....
.####
...##
.....
**...
**...
*####
***##
.....
##...
##...
.*...
**...
.*...
##...
##...
.....
#****
.....
#....
#....
**...
**...
.....
#....
#....
##.*.
##***
.....
#....
#....
...

result:

ok good job!

Test #7:

score: 100
Accepted
time: 74ms
memory: 3712kb

First Run Input

prepare
88
ZL OL OT IT LO ZL OI ZT TO OI OL OL LZ ZT TL TZ IO ZL TZ TO IL LO ZT OL LT ZI TZ IL LT ZL OT TI ZO ZO ZT OZ TL TL LO OI TO OZ LI ZO ZT ZT IO IZ OZ ZO ZI ZO IO IO TI OL IL IT IL TL TL ZL IT IT ZO IO OL IL ZI TO OL IL ZI LZ LT IL LI ZO IL TL IT LI ZI OL TO OZ IZ OZ

First Run Output

LLOIOLITOIOOLZTTILZOILTOLITITLTTZOTOLLLOTZLOTZIZOOZZIOILIILLTLTIOIOIZTOLILLLLZILIIILTZIO

Second Run Input

play
88
L
L
O
I
O
L
I
T
O
I
O
O
L
Z
T
T
I
L
Z
O
I
L
T
O
L
I
T
I
T
L
T
T
Z
O
T
O
L
L
L
O
T
Z
L
O
T
Z
I
Z
O
O
Z
Z
I
O
I
L
I
I
L
L
T
L
T
I
O
I
O
I
Z
T
O
L
I
L
L
L
L
Z
I
L
I
I
I
L
T
Z
I
O

Second Run Output

***..
*....
.....
.....
.....
###**
#...*
....*
.....
.....
.....
#...#
....#
**...
**...
.....
#...#
****#
##...
##...
.....
#...#
.....
##.**
##.**
**...
#*..#
.*...
##.##
##.##
#****
#...#
.....
#..##
#..##
..*..
#***#
.....
#..##
#..##
..#..
.....
.....
#**##
#**##
..#..
..*..
..*..
..*..
..*..
...

result:

ok good job!

Test #8:

score: 100
Accepted
time: 95ms
memory: 3716kb

First Run Input

prepare
105
LI LI OI TL OZ LZ IL IZ IL TI IL IO OT LT LO ZO LI LZ OI IL ZT IT LZ IZ IZ LI IT LI IO TI ZL OI IT LO TZ OI IL OL IL OT IL OZ LT IO OL OL LO ZO TI LI LI LI ZO ZI LI OL TI TZ LO LT IL LZ IL OL ZT LT IZ IL TZ IT OZ TL ZI IZ IZ TO IT IO TO TI TO TZ ZT IZ LI IL ZI TI TL TZ TO LI LO OL IL IL ...

First Run Output

LLOLOLIIITIOTLLZLZOITIZZILIIITLIIOTOILLOIOLIOOLZIIIIOILOITOTIZIOZLZITIOTIIITIOOTOTTILIIILTTILOLIZOTLOIIIO

Second Run Input

play
105
L
L
O
L
O
L
I
I
I
T
I
O
T
L
L
Z
L
Z
O
I
T
I
Z
Z
I
L
I
I
I
T
L
I
I
O
T
O
I
L
L
O
I
O
L
I
O
O
L
Z
I
I
I
I
O
I
L
O
I
T
O
T
I
Z
I
O
Z
L
Z
I
T
I
O
T
I
I
I
T
I
O
O
T
O
T
T
I
L
I
I
I
L
T
T
I
L
O
L
I
Z
O
T
L
O
I
I
I
O

Second Run Output

***..
*....
.....
.....
.....
###**
#...*
....*
.....
.....
.....
#...#
....#
**...
**...
**...
#*..#
.*..#
##...
##...
#....
#...#
....#
#..**
#..**
#..**
#..*#
...*#
#..##
#..##
#....
#****
.....
#....
#....
#....
.....
.....
#****
#....
#****
.....
.....
.....
#....
....*
...**
....*
.....
#....
...

result:

ok good job!

Test #9:

score: 100
Accepted
time: 182ms
memory: 3872kb

First Run Input

prepare
204
TZ TL OL TL ZO OT ZO LI TZ IO TI OL LZ TI TO ZT IL OI LT IT OZ TI OT TI ZL ZI ZO TI OI ZI TL LI ZI IO TI ZL LZ OL ZI TZ OI OI IZ LO IL LO IZ ZT ZT OL ZI OZ TL OI TI IT IZ ZL TI OI LZ OI TZ IZ IO OZ ZI TO OT TI TO IO IZ OI TZ LT TZ ZI OL LO LO OZ LO ZL LZ TZ LT TO OL LO LT TZ TL OZ ZO LO ...

First Run Output

TLOTOOOITIILLIOTIOLIOTTTLIZTOITIZOILLLZZOIIOILIZZLIOTOTTILIILIZIIZITOITIIITTZILLLOOZZTLOLOLZLOOLOLIIZITLTTZILOITZIIILOOIIZTIITITILLLZZTLZLZOOTLZLTLZZOOZTZLTILIOIZLIZILZIIOOLLIOLZTIZLIIIZLZITLZZILOIZTLOLZL

Second Run Input

play
204
T
L
O
T
O
O
O
I
T
I
I
L
L
I
O
T
I
O
L
I
O
T
T
T
L
I
Z
T
O
I
T
I
Z
O
I
L
L
L
Z
Z
O
I
I
O
I
L
I
Z
Z
L
I
O
T
O
T
T
I
L
I
I
L
I
Z
I
I
Z
I
T
O
I
T
I
I
I
T
T
Z
I
L
L
L
O
O
Z
Z
T
L
O
L
O
L
Z
L
O
O
L
O
L
I
I
Z
I
T
L
T
T
Z
I
L
O
I
T
Z
I
I
I
L
O
O
I
I
Z
T
I
I
T
I
T
I
L
L
L
Z
Z
T
L
Z
L
Z
O
O
T
L
Z
L
T...

Second Run Output

....*
...**
....*
.....
.....
*...#
***##
....#
.....
.....
#...#
.....
....#
**...
**...
#*..#
**...
.*..#
##...
##...
#...#
#....
....#
#..**
#..**
#...#
#....
....#
#**##
#**##
#...#
#....
....#
**...
**...
#...#
#....
****#
##...
##...
.*..#
**...
.*...
.#...
.#...
....#
#****
.....
.....
.....
...

result:

ok good job!

Test #10:

score: 100
Accepted
time: 270ms
memory: 3676kb

First Run Input

prepare
303
ZT ZT IO ZL LT TI LO LZ TI ZT TI ZT LO OZ ZT TL IT TZ ZI IL TL OZ IO OT ZT TI LT ZT ZL ZL IO LZ IZ IZ ZT TZ OT OI LZ IL IZ TL IT ZO TL ZL IZ IZ LO LO ZI TI OT ZT OI IT ZI IL OI TO ZL LI TL LT OI LZ TI TZ OL ZO OZ IL LO ZT ZL IT TO ZI TZ IL IO LO LT IT OL LO ZT OZ OI TI OL OZ ZI IT IO IT ...

First Run Output

TTOZLILLIZITLOZTTZILLZOOZILZZLOLIIZTTILIZLIZLZZZLLZIOZITZIOTLILLOLITLZZIOTLIOIZLILLIOOTOOILOZTOTLLZLOLLZTTTIIIOTOTTLZOZOILLOIOLOOTIZOIIIILOLOOITTLLLZILZLZOITLIIIZTOZITLZLLZIZLOTTILOZLTIIIIITOZZLOOLILIZITZLTTOOTTOLITTITIIOIIOTOOILTZOOTOOLILILOLIZLIZOZLTOITOZZOIIITILOTLLIOILITOOLOILTLOOLOITIOTIZZILLZOOLT

Second Run Input

play
303
T
T
O
Z
L
I
L
L
I
Z
I
T
L
O
Z
T
T
Z
I
L
L
Z
O
O
Z
I
L
Z
Z
L
O
L
I
I
Z
T
T
I
L
I
Z
L
I
Z
L
Z
Z
Z
L
L
Z
I
O
Z
I
T
Z
I
O
T
L
I
L
L
O
L
I
T
L
Z
Z
I
O
T
L
I
O
I
Z
L
I
L
L
I
O
O
T
O
O
I
L
O
Z
T
O
T
L
L
Z
L
O
L
L
Z
T
T
T
I
I
I
O
T
O
T
T
L
Z
O
Z
O
I
L
L
O
I
O
L
O
O
T
I
Z
O
I
I
I
I
L
O
L
O
O
I
T
T
L...

Second Run Output

....*
...**
....*
.....
.....
.*..#
***##
....#
.....
.....
.#..#
.....
....#
**...
**...
*#..#
**...
.*..#
##...
##...
#***#
#*...
....#
#....
#....
.....
##...
****#
#....
#....
....*
##***
.....
#....
#....
**..#
*....
*....
#....
#....
.#..#
.*...
.*...
.*...
.*...
..**#
...**
.....
.....
.....
...

result:

ok good job!

Test #11:

score: 100
Accepted
time: 446ms
memory: 3888kb

First Run Input

prepare
502
LO LI OZ LO IO ZT LO OZ OZ ZI IO OT ZO LZ IZ ZT TL TL LI IL IZ TO IO IL OL OL OL LO ZI OZ OZ ZO OZ IT OZ LZ TZ TO LZ TL ZL IZ LZ ZO ZL IO IL LI LT ZI OZ IZ OI TZ LI ZT IT LO TO ZI LT OT LZ OI LZ OZ LZ IT TO TI OI TO TO OI TZ ZL IO OZ ZO ZL LZ IZ OI TL TO TI LZ ZL ZL OZ TI ZI TL LO ZT LI ...

First Run Output

OLZOOTLOOIITOLITTTIIIOOIOOLLIOOOOTOLTOZTZILZLIILLZOZITLTIOOILTLOLOLIOTOTOIZLIOOZLZOLOIZZLOIZLOTIOITOTTILOLOTOZTLZTIOOZLOLLZZOLOIOIIIZIILIILOZOZOIZTLTOTLILITZLLILTIIIOOLLTLTOILLITZTLTITZTLOZLTLOOIILOZOZOITZIZLOIOITOZTZTOZLOOTZIZLIOLTIZLLOZZIITTOOIIIIZLZLOTLOIOIZLOOZTOIITILTILLIIIITIOOIIOOTZILLIZILIZL...

Second Run Input

play
502
O
L
Z
O
O
T
L
O
O
I
I
T
O
L
I
T
T
T
I
I
I
O
O
I
O
O
L
L
I
O
O
O
O
T
O
L
T
O
Z
T
Z
I
L
Z
L
I
I
L
L
Z
O
Z
I
T
L
T
I
O
O
I
L
T
L
O
L
O
L
I
O
T
O
T
O
I
Z
L
I
O
O
Z
L
Z
O
L
O
I
Z
Z
L
O
I
Z
L
O
T
I
O
I
T
O
T
T
I
L
O
L
O
T
O
Z
T
L
Z
T
I
O
O
Z
L
O
L
L
Z
Z
O
L
O
I
O
I
I
I
Z
I
I
L
I
I
L
O
Z
O
Z
O
I
Z...

Second Run Output

**...
**...
.....
.....
.....
##..*
##***
.....
.....
.....
##**#
...**
.....
.....
.....
**...
**.##
.....
.....
.....
##...
##.##
.....
**...
**...
##...
##.##
.....
##***
##.*.
##***
##*##
.....
.....
##.#.
**...
**...
.....
.....
##.#.
##...
##...
**...
**...
##.#.
...*.
...*.
...*.
...*.
...#.
...

result:

ok good job!

Test #12:

score: 100
Accepted
time: 699ms
memory: 3640kb

First Run Input

prepare
801
TL TL TZ LO LO TI ZI LI LZ OT OZ LT OL IL OZ OT OT IO ZL OZ OT ZL LO TO TZ TL OI ZO TI ZI TO IT ZL TZ IZ IT IL ZO IO LT ZI OZ LO TI OI TO LI IL LT LZ LT OZ IL LZ ZO ZT IL ZL TZ OI IZ TL ZI OT TO IL IO OZ IO ZL OT IZ IZ IT IT OI OZ ZL ZT ZT OI IT IZ IL ZL LZ TI IZ IZ IZ ZI LT ZT LZ IO LZ ...

First Run Output

TLTOOTIILOOLLIOOTIZOOLOOZLIOIITILZIILOILZOLIOTIILLLOLLOTLZTIITIOTIOOOLOIITIIOLTTIIZLZLIIIIZTTLOZTOLZZTLOLZOILOOOLILZLZTLOOLOZOZLLILOLIOTOZOIOZLTLTITILOTLOZIZOTTLZLIZLLILLOLIOOTOILLIOZLOIZOLLOLTILIZIIOTLLZLOOIIOZZIITZOZOLIOZTIZOILLTIITZIZTILTITOOLOLZLILLOTZOOLTLOLIITILIZIIZOOOTTIOLTIIZILIIZILZZOZLOOT...

Second Run Input

play
801
T
L
T
O
O
T
I
I
L
O
O
L
L
I
O
O
T
I
Z
O
O
L
O
O
Z
L
I
O
I
I
T
I
L
Z
I
I
L
O
I
L
Z
O
L
I
O
T
I
I
L
L
L
O
L
L
O
T
L
Z
T
I
I
T
I
O
T
I
O
O
O
L
O
I
I
T
I
I
O
L
T
T
I
I
Z
L
Z
L
I
I
I
I
Z
T
T
L
O
Z
T
O
L
Z
Z
T
L
O
L
Z
O
I
L
O
O
O
L
I
L
Z
L
Z
T
L
O
O
L
O
Z
O
Z
L
L
I
L
O
L
I
O
T
O
Z
O
I
O
Z
L
T
L
T...

Second Run Output

....*
...**
....*
.....
.....
*...#
***##
....#
.....
.....
#***#
..*..
....#
.....
.....
**...
**#..
....#
.....
.....
##.**
###**
....#
.....
.....
##*##
.***.
....#
.....
.....
.....
.###.
****#
.....
.....
****.
.###.
.....
.....
.....
####.
.###.
..*..
..*..
..**.
##.#.
.#.#.
...**
...**
...#.
...

result:

ok good job!

Test #13:

score: 100
Accepted
time: 871ms
memory: 3652kb

First Run Input

prepare
1000
LT LT TO OL ZI OI IO IL TO IO IT LZ ZL ZL OL OI OL TO IO OL IZ ZO TZ OZ TL LT IZ LO IZ IO IO ZT IO TZ LI ZL ZT LT TL TL IL TI OZ LO TO OI LI LI OL ZI ZI TI IO OL ZT LT ZL ZI TZ TL OT ZL OT TI OL IT ZL IT OT LZ LZ LZ IL OZ LO ZI TZ IT TO TZ OZ ZI IT TZ LZ ZT ZO LT OT TI OZ LI OZ TL LO OT...

First Run Output

LLOLIOOITIILLLOIOOIOIZTZLTILIOITITLZZLTLLIZLTILLLZITOOTLLIZTOZTILIZITLLZLOLIZTOTZZITZTZTOTZIZTLTLOOTZLILTIOIZOIIITLZZZTIZZLOIOTOOOLLOZTOTLILLOLOTIZOZLIIIOIOIILLOZTILIZLZLILLTLZLTTTZILOILTTZOZIOTLZIIITZIOITIIZTTOOILOTIILIZZLOIOLTIOTLOILOILZLLIZTTLLZTTOIIZZLTTOIOOLLLIITLIIOILIZTIIIITLZOOLTITZLIILZTLIO...

Second Run Input

play
1000
L
L
O
L
I
O
O
I
T
I
I
L
L
L
O
I
O
O
I
O
I
Z
T
Z
L
T
I
L
I
O
I
T
I
T
L
Z
Z
L
T
L
L
I
Z
L
T
I
L
L
L
Z
I
T
O
O
T
L
L
I
Z
T
O
Z
T
I
L
I
Z
I
T
L
L
Z
L
O
L
I
Z
T
O
T
Z
Z
I
T
Z
T
Z
T
O
T
Z
I
Z
T
L
T
L
O
O
T
Z
L
I
L
T
I
O
I
Z
O
I
I
I
T
L
Z
Z
Z
T
I
Z
Z
L
O
I
O
T
O
O
O
L
L
O
Z
T
O
T
L
I
L
L
O
L
O
T
...

Second Run Output

***..
*....
.....
.....
.....
###**
#...*
....*
.....
.....
.....
#...#
....#
**...
**...
**...
#*..#
.*..#
##...
##...
#....
#...#
****#
#....
#....
**...
**..#
.....
.....
.....
##**.
##**#
.....
.....
.....
####.
..*..
..*..
..*..
..*..
##.#*
...**
....*
.....
.....
##.##
...##
****#
.....
.....
...

result:

ok good job!

Test #14:

score: 100
Accepted
time: 897ms
memory: 3880kb

First Run Input

prepare
1000
LI ZL ZL OZ ZT ZO IO OZ OI ZI IL ZI OT OI TL TI IT IT TO ZO TI LZ IL IZ OL ZT LZ ZL TI IT TZ LZ IZ OZ ZI ZO IL OL TI OI ZT OL IO OL TZ LT IO ZO TL OT TO ZT OZ TO IO LT ZL TI ZL ZL ZL ZL TL TL TO ZI TI OT TZ OI IL OT TI LI ZT OT IO LT OT OZ IO IL OL TI OT TZ LT OI IO ZO TI IT OT ZT OZ LT...

First Run Output

LZLZZZOOOILZTOTITIOOILIZOTLLTITZIZZOILIITLOLTLIOTOOTOTOTZIZLZZLLTZITTIIOILTTILOOOLOTTTTIIOTTOZZTOOTLILOTIIIZZZLLOOILIOTTIZLLTZILIIOOTOLOZOLTLITTOZTIOILZOLOLIITTOOILLIIOOTZTOILLILTLIOOIIOOLTIIIOTZOTIZIZLOIOIOLLLLLZOTZOTTLIITTTZIZILLILOILZOLOILTLOIOTOIIZIIIOOTTLLTZTZOLOTTLILOTOIOIOLILZZZLZOIOLLIZZIZIL...

Second Run Input

play
1000
L
Z
L
Z
Z
Z
O
O
O
I
L
Z
T
O
T
I
T
I
O
O
I
L
I
Z
O
T
L
L
T
I
T
Z
I
Z
Z
O
I
L
I
I
T
L
O
L
T
L
I
O
T
O
O
T
O
T
O
T
Z
I
Z
L
Z
Z
L
L
T
Z
I
T
T
I
I
O
I
L
T
T
I
L
O
O
O
L
O
T
T
T
T
I
I
O
T
T
O
Z
Z
T
O
O
T
L
I
L
O
T
I
I
I
Z
Z
Z
L
L
O
O
I
L
I
O
T
T
I
Z
L
L
T
Z
I
L
I
I
O
O
T
O
L
O
Z
O
L
T
L
I
T
T
O
...

Second Run Output

***..
*....
.....
.....
.....
###**
#.**.
.....
.....
.....
...**
#.##*
....*
.....
.....
...##
#*###
**..#
*....
.....
...##
.....
##**#
#..**
.....
...##
.....
.....
#**##
**...
**.##
**...
.....
.....
##...
##.##
##...
**...
**...
##...
**.##
**...
.....
.....
.....
##.##
##.*.
...*.
...*.
...*.
...

result:

ok good job!

Test #15:

score: 100
Accepted
time: 864ms
memory: 3648kb

First Run Input

prepare
1000
LI LI TO TO ZL TO OI ZO TO TI TZ IT OL IZ OZ ZO TO ZL LT TI IZ TL IL TO TZ TO LZ ZT OZ ZT OI IO OI LZ LT ZI LI IZ TO OL ZI TI LO ZT TO IZ IO LO ZI IO IT TL LZ TL LO TO OL IO TZ IT TI IT IT OL ZT OL LO LZ ZI ZI ZO ZT IO OL LT TO IL ZL TI LO ZL LO LT IL IT OI OT OZ TO IT LT LZ LI IT OT ZI...

First Run Output

ILTTLTIOTTZTOIOOOZLTITLTZTLZOTOIOLLZIITLIIOTTIILZIILZLLOOOTTTIIOZOLLIIOZOLLOLLILLOLLIOTZTITLLIOITOITZTITIIIZLITLZZILTZTIZIZTIIOOZZOLTITTIZLIOTIIZTITIITOIITLOLITOLZOLIIOOLOZOLOLZOILTOTTIOIOOOOILOLZTILOZOLZOIIOTZOOILLTITZLTOZILZLIOILTIZLIOIZOTLIZLTTTTILLLOZOZITTLOLILIILTZLTLTTILIIZLOZZLZTITLZITIIIIZII...

Second Run Input

play
1000
I
L
T
T
L
T
I
O
T
T
Z
T
O
I
O
O
O
Z
L
T
I
T
L
T
Z
T
L
Z
O
T
O
I
O
L
L
Z
I
I
T
L
I
I
O
T
T
I
I
L
Z
I
I
L
Z
L
L
O
O
O
T
T
T
I
I
O
Z
O
L
L
I
I
O
Z
O
L
L
O
L
L
I
L
L
O
L
L
I
O
T
Z
T
I
T
L
L
I
O
I
T
O
I
T
Z
T
I
T
I
I
I
Z
L
I
T
L
Z
Z
I
L
T
Z
T
I
Z
I
Z
T
I
I
O
O
Z
Z
O
L
T
I
T
T
I
Z
L
I
O
T
I
I
Z
...

Second Run Output

****.
.....
.....
.....
.....
####*
..***
.....
.....
.....
*....
**###
*....
.....
.....
#...*
...**
#...*
.....
.....
#...#
...##
#***#
.*...
.....
#*..#
***##
.....
.#...
.....
##..#
*....
*....
*#...
*....
.#..#
.....
.....
.#.**
...**
.#.*#
...**
...*.
.#.##
...##
.#..#
...*#
...**
.#.*#
....#
...

result:

ok good job!

Test #16:

score: 100
Accepted
time: 879ms
memory: 3640kb

First Run Input

prepare
1000
LZ TZ IT LO LO IL TZ OL LO OZ TZ TL LZ IT LZ OL ZI TO IZ ZI ZT ZT OL IL LI TI IZ LZ LI ZI OL LI IO ZL IL ZI TZ TZ LI IZ LZ ZO ZO ZO OZ TL TZ TO ZI IZ OZ LI IO IL LI TO IT LI OT TI OT IO TO OZ LO IT LT TI LZ TO TL OZ TL OZ TI ZI IT OZ OZ TL LT LT ZL ZI ZT OI LO LT IL IZ IT OI OT ZL IZ ZL...

First Run Output

ZTTLOITOLOTLZILLZTZITTOILTILLZLIIZLIZZIIZZOOOLTOZIZLILLTILOTOOTZOTLILOTOLZTZIOOLLTLIZILLIIIIOLZLIOTLTZLOIZZIIZOIILLLOLOIOILIIOOLOITILZLLIILOOTLOLLTZOTOOLLIZIOOLTLZIOTOTIIOTILTZTOIOOTIZIZIZIZTTOTIIIIZITOILLLOLIZLOTITTIZILZLTIILIIZTLOOTIITIOZTZOLOOIIOIILIOOTILIOOTTTZIOLIILOTIZZOTTLLTIITILILLILZLOTIZTI...

Second Run Input

play
1000
Z
T
T
L
O
I
T
O
L
O
T
L
Z
I
L
L
Z
T
Z
I
T
T
O
I
L
T
I
L
L
Z
L
I
I
Z
L
I
Z
Z
I
I
Z
Z
O
O
O
L
T
O
Z
I
Z
L
I
L
L
T
I
L
O
T
O
O
T
Z
O
T
L
I
L
O
T
O
L
Z
T
Z
I
O
O
L
L
T
L
I
Z
I
L
L
I
I
I
I
O
L
Z
L
I
O
T
L
T
Z
L
O
I
Z
Z
I
I
Z
O
I
I
L
L
L
O
L
O
I
O
I
L
I
I
O
O
L
O
I
T
I
L
Z
L
L
I
I
L
O
O
T
L
O
L
...

Second Run Output

....*
...**
...*.
.....
.....
.*..#
***##
...#.
.....
.....
.#..#
.....
...#*
...**
....*
.#..#
.....
***##
*..##
....#
.#..#
.....
.....
#**##
.**.#
.#*.#
..*..
..*..
..*..
.##.#
.#..#
.*...
**...
.*...
.#..#
**..#
**...
#....
.....
....#
##..#
##...
#*...
.*...
**..#
#**.#
#**..
#....
.....
#...#
...

result:

ok good job!

Test #17:

score: 100
Accepted
time: 921ms
memory: 3744kb

First Run Input

prepare
1000
IT IO TZ IO TZ OZ OZ IO IL IZ ZT LZ LZ OI IO ZT LI LI LT OI TZ ZT OI OZ ZT LZ LI IL TI OZ LI TZ OT TZ LZ TI LO TI LI LT LI ZL LO TO ZL TI OI ZL OT IO ZL ZT LT OL TL ZL IT TZ TL TZ ZO IO IO IO ZI TL ZO OI TL TO LT ZO ZO OT IO IL IZ ZT OL IO LI LI OL ZI OI LT IT ZO IZ TO IL IT OT LO OZ LT...

First Run Output

TITOZOOOLZZLLOITILLOTZOZZLIITOLZOTLILIILIZOOLIILOOLTTOLZITLZZIIIILOITOLOZOILITLOIILZOTIOZOIITLOLLZITIITILIITOIITTLOOLOIOTLTTOLIOZIOTLLIZLLLIZIZTZOLTTLZZLIOTLOTZTZZZTOZILIOTIZLITITILIOLLOLZLIZILZLIOOTIOTLOTOOZLLZLTOZOITOOITIILLTITIZLLLZTTOLZTLOIITTIIZTTILTTIOTTILZITLOZZIOTOOLIZTOILTOTLIOOIOITLIITIZLL...

Second Run Input

play
1000
T
I
T
O
Z
O
O
O
L
Z
Z
L
L
O
I
T
I
L
L
O
T
Z
O
Z
Z
L
I
I
T
O
L
Z
O
T
L
I
L
I
I
L
I
Z
O
O
L
I
I
L
O
O
L
T
T
O
L
Z
I
T
L
Z
Z
I
I
I
I
L
O
I
T
O
L
O
Z
O
I
L
I
T
L
O
I
I
L
Z
O
T
I
O
Z
O
I
I
T
L
O
L
L
Z
I
T
I
I
T
I
L
I
I
T
O
I
I
T
T
L
O
O
L
O
I
O
T
L
T
T
O
L
I
O
Z
I
O
T
L
L
I
Z
L
L
L
I
Z
I
Z
T
Z
...

Second Run Output

....*
...**
....*
.....
.....
....#
...##
****#
.....
.....
.*..#
***##
.....
.....
.....
.#..#
.....
.....
**...
**...
*#..#
**...
.*...
##...
##...
#...#
#....
.....
#..**
#..**
#...#
#....
.....
#**##
#**##
#...#
#....
.....
**...
**...
#*..#
#*...
**...
##...
##...
..**#
...**
.....
.....
.....
...

result:

ok good job!

Test #18:

score: 100
Accepted
time: 894ms
memory: 3864kb

First Run Input

prepare
1000
OZ TZ TO LZ ZI IT IL TL LO IL ZT OI TZ LO IT LO ZT OI TZ TL LO IO OZ LZ IL OL ZI ZT ZO ZL ZI OZ TI ZO OT OI IL LZ LI LO TZ LZ LZ OL LO ZL IZ LT OL IT ZT IO OL LO OZ LZ ZO TL OZ IO LI IZ IT ZI ZL IT TI TO ZO LI TI IL TO ZT LZ ZO ZO LT IT TO ZT OT ZL IO TL LI TL TO ZT IO OT TZ LI LZ IO TZ...

First Run Output

OTTZZTLLOITIZLIOTOTLLIOLILITOZZOIZTIILLLTLLOLZILOITIOLZZOLOILZIZZIIOOLILOZLOOTIOTOLITLLTZIOZIZIZITIOTOLLLZZILOZOZLOLZIZOOOZZLLTLLZOZIIIZITLLLLLLOZITZTILLOZZZZOLOIITIIOTIZOLZZLZIZZLTTZTZTZTOLLIZITOZLILILOOIIITTIZOITLZLZLITLLLZLTZOZLTLLTIITILLIZOIOLZZITLTTLTZLOLIZTOLTZLTLOTOIIZTOOIIOTOIOOLTTZILZIZOTTT...

Second Run Input

play
1000
O
T
T
Z
Z
T
L
L
O
I
T
I
Z
L
I
O
T
O
T
L
L
I
O
L
I
L
I
T
O
Z
Z
O
I
Z
T
I
I
L
L
L
T
L
L
O
L
Z
I
L
O
I
T
I
O
L
Z
Z
O
L
O
I
L
Z
I
Z
Z
I
I
O
O
L
I
L
O
Z
L
O
O
T
I
O
T
O
L
I
T
L
L
T
Z
I
O
Z
I
Z
I
Z
I
T
I
O
T
O
L
L
L
Z
Z
I
L
O
Z
O
Z
L
O
L
Z
I
Z
O
O
O
Z
Z
L
L
T
L
L
Z
O
Z
I
I
I
Z
I
T
L
L
L
L
L
L
O
...

Second Run Output

**...
**...
.....
.....
.....
##...
##...
.*...
**...
.*...
#...*
#..**
....*
#....
.....
#.**#
#**##
....#
#....
.....
#*###
**...
*...#
#....
.....
...*.
##***
#...#
#....
.....
...#.
.....
#***#
#*...
.....
...#.
.....
.....
##***
....*
**.#.
**...
.....
.....
....#
##.#.
##.*.
...*.
...*.
...*#
...

result:

ok good job!

Test #19:

score: 100
Accepted
time: 883ms
memory: 3636kb

First Run Input

prepare
1000
LT LT ZI TI ZL ZL IZ IT LO TZ OZ OI TL TZ LO LI ZT OZ LZ ZO OI LZ OT ZI ZO LI LO OL LO LI TO TO TO ZI LO IL ZL LZ TO TO ZO LZ IT TZ LZ ZT ZO ZT TI LZ IZ TL ZI ZI ZL ZT OI ZT IT LI ZI IO TI TL LT OI IL IL TO OL TI OT TI OI LO ZT IL LT IZ IL TZ IO TZ ZI LZ TL OL ZT IL LI ZT IO TZ ZL LT LZ...

First Run Output

TTIIZLZTLTOOTZLIZZLOOLOIOLLOOITOTIOIZLTOOZTTLZZTILZLIILZIZILIOILLIILTOTOIIOZLTILTITILLOTLLZITZLZTTOILLIIZZLIOLTLOOTILLLZIOILLOZIZLTIITZOOTLLLTIIITLTTTOOTOILZLZITOOTTILZZLLTILIIOOIZTOTOTILZILLZTTOIZTTZLTILOOTLOLIZTOTLIOZLIITZOIZIIZOLTTIOLZTZTIZOLOLIOTZLTTLOZOZTILIIOITITLITILZIIILZLOILIIOLLLOTLLIIOTIT...

Second Run Input

play
1000
T
T
I
I
Z
L
Z
T
L
T
O
O
T
Z
L
I
Z
Z
L
O
O
L
O
I
O
L
L
O
O
I
T
O
T
I
O
I
Z
L
T
O
O
Z
T
T
L
Z
Z
T
I
L
Z
L
I
I
L
Z
I
Z
I
L
I
O
I
L
L
I
I
L
T
O
T
O
I
I
O
Z
L
T
I
L
T
I
T
I
L
L
O
T
L
L
Z
I
T
Z
L
Z
T
T
O
I
L
L
I
I
Z
Z
L
I
O
L
T
L
O
O
T
I
L
L
L
Z
I
O
I
L
L
O
Z
I
Z
L
T
I
I
T
Z
O
O
T
L
L
L
T
I
I
I
...

Second Run Output

....*
...**
....*
.....
.....
.*..#
***##
....#
.....
.....
.#..#
.....
****#
.....
.....
.#..#
.*...
.*...
.*...
.*...
..**#
...**
.....
.....
.....
..###
...##
...*.
...*.
...**
..#.#
....#
....*
...**
...*#
..#*.
...**
...*.
...#.
...#.
..#..
....#
.....
....*
..***
..#..
..*.#
.**..
..*.#
..###
...

result:

ok good job!

Test #20:

score: 100
Accepted
time: 890ms
memory: 3944kb

First Run Input

prepare
1000
OI LO ZI TI TI OT TI OZ TI TO IO ZL IT TL OT IZ IT ZI LT ZT TI ZL LI IL TZ LZ LZ OT LI LO OZ LO OZ ZT TZ OI LT IL LO IL OI TO IT LI ZL IO ZT OZ IL OI ZT OZ TZ TZ OZ OT TZ ZT LT OZ OL OL IT TI IZ TZ ZI ZL OI ZI ZL ZO ZT LO LI IL LO OI TI LO LZ IO IL IT OI OL ZO OI ZL ZT OZ LO LT LZ TZ OZ...

First Run Output

OLZTIOTOTTIZILTIIZTZIZIITLLOILOLZTTILILLIOTILOTOLOZZZTZTTZLOOOIIITIZOILOTOLIOITLLIIIOLZOLZOOLZZZLLZLLZTLIZTZTLZZLLILZOZOOLOIZOIIOIOLTLZTITLLTITIIILZIIZILZTZTIOZOOIITILZLOLZIOLITLZOLITLOZTIOTITIOZZZIITOOZIIOTOIOIOOZIOLOLOLIZTLOZTTOIIOTOLIOIIILTIOZIIOIOITIOLOLIIILLOZLLOLOIOLILZLZILOOTLLIZOOOLITLOZZZZI...

Second Run Input

play
1000
O
L
Z
T
I
O
T
O
T
T
I
Z
I
L
T
I
I
Z
T
Z
I
Z
I
I
T
L
L
O
I
L
O
L
Z
T
T
I
L
I
L
L
I
O
T
I
L
O
T
O
L
O
Z
Z
Z
T
Z
T
T
Z
L
O
O
O
I
I
I
T
I
Z
O
I
L
O
T
O
L
I
O
I
T
L
L
I
I
I
O
L
Z
O
L
Z
O
O
L
Z
Z
Z
L
L
Z
L
L
Z
T
L
I
Z
T
Z
T
L
Z
Z
L
L
I
L
Z
O
Z
O
O
L
O
I
Z
O
I
I
O
I
O
L
T
L
Z
T
I
T
L
L
T
I
T
I
I
...

Second Run Output

**...
**...
.....
.....
.....
##..*
##***
.....
.....
.....
##**#
...**
.....
.....
.....
.*...
***##
.....
.....
.....
.#...
.*...
.*...
.*...
.*...
**...
**...
.....
.....
.....
##...
##...
.*...
**...
.*...
#..**
#..**
.....
#....
.....
#..##
#..##
...*.
#..**
...*.
#.*.#
#***#
.....
#...#
.....
...

result:

ok good job!

Test #21:

score: 100
Accepted
time: 909ms
memory: 3640kb

First Run Input

prepare
1000
LT IO OZ TZ OI ZT IO LT LT TZ TL OT OT LI OT IL TL TZ IT TO ZT OZ LI ZO LO OL OZ ZL TL ZI IL TL LO IZ OT TI IZ LO TI TO ZI OT TO OI LT LZ ZO ZI TL TI LT IZ LZ OL IT TL OT TZ OT ZI LT ZI OL OL OZ OZ TI TZ IT OT TZ OZ OI OL IL OI TZ OI TL ZI IT ZT LT TO TZ OL TO TO LT IZ OI TL TZ ZT IL IZ...

First Run Output

LIOTOZITLTLOTITITTITTOIOLOOZTIILLITTIOTOITTOTZZITILILOILOTOZTIOOOOIZTOTZILIITILZIZLOTOOTLIOLZZIILLLOLLIILOITLTTILZIOTOTZOTLTOOOOTIITIIOTLTIIOIZOIILZLOITLLILIZZOLZIIIOTZOTTLZIOTILOOLOZIZLTOILZTLOLZLZOOTTILZLOZLTOOOZTIOLLTLIIIZLZILIZZTOLOTIZZTTLLTILLLLZILIITITZOTTTTOTIIIZTILTOLIIZLOLIZLTTTOLOOZZLZILOT...

Second Run Input

play
1000
L
I
O
T
O
Z
I
T
L
T
L
O
T
I
T
I
T
T
I
T
T
O
I
O
L
O
O
Z
T
I
I
L
L
I
T
T
I
O
T
O
I
T
T
O
T
Z
Z
I
T
I
L
I
L
O
I
L
O
T
O
Z
T
I
O
O
O
O
I
Z
T
O
T
Z
I
L
I
I
T
I
L
Z
I
Z
L
O
T
O
O
T
L
I
O
L
Z
Z
I
I
L
L
L
O
L
L
I
I
L
O
I
T
L
T
T
I
L
Z
I
O
T
O
T
Z
O
T
L
T
O
O
O
O
T
I
I
T
I
I
O
T
L
T
I
I
O
I
Z
O
I
...

Second Run Output

***..
*....
.....
.....
.....
###..
#.*..
..*..
..*..
..*..
##.**
#..**
.....
.....
.....
##.##
#..##
...*.
...**
...*.
##**#
#.**#
.....
....#
.....
.....
#*###
**...
*...#
.....
****.
.....
##...
#...#
.....
####.
...*.
##***
#...#
.....
####.
...#.
...*.
#..*#
...**
###..
.....
.....
#***#
..*.#
...

result:

ok good job!

Test #22:

score: 100
Accepted
time: 872ms
memory: 3936kb

First Run Input

prepare
1000
TZ LO LI OZ TI TO ZT TZ TL IO ZO TI OL IT IL LO TZ TO ZO LT IT TZ ZT TO TL TI ZL TI OZ LO TO IL OT OL TI ZI OZ IL IT LI ZT IZ TI IZ OZ IT IO IT ZT IT ZI OI IZ IL IO IO OT OT LT IT TL IO IO IO OI TI ZL ZL OI TO TZ TI OI LT OT TI ZT TI ZI OL LT TZ LO OI TL LT TZ OT ZO TZ IZ ZI TO OZ LO IT...

First Run Output

TLIZITTZTOZTLIIOTTZLITZOLIZIOOTLOLTZOITIZIIIOIIITTIOILIOOOLITIIIOTLLITTIILTTTTIOLZOOLLZTZZIZOZLILLIILLZTIOOLZOIOIOTIIZLOOLOTLLOLTIIZLLOZIZIITOTITZIZITIOOTOIZLLZLZLTOTTILZLTTOZIIOZLOIITIZOOLOLZIOZLOZLLILIIITTILOTZITOILTIZLLZILZTTTOOLITTZIILIZLIZOIZIOOLILZIOTTILOOLOLOZLOILLIITTOLTOOOTLZTTZTZTOIZILILIT...

Second Run Input

play
1000
T
L
I
Z
I
T
T
Z
T
O
Z
T
L
I
I
O
T
T
Z
L
I
T
Z
O
L
I
Z
I
O
O
T
L
O
L
T
Z
O
I
T
I
Z
I
I
I
O
I
I
I
T
T
I
O
I
L
I
O
O
O
L
I
T
I
I
I
O
T
L
L
I
T
T
I
I
L
T
T
T
T
I
O
L
Z
O
O
L
L
Z
T
Z
Z
I
Z
O
Z
L
I
L
L
I
I
L
L
Z
T
I
O
O
L
Z
O
I
O
I
O
T
I
I
Z
L
O
O
L
O
T
L
L
O
L
T
I
I
Z
L
L
O
Z
I
Z
I
I
T
O
T
I
T
...

Second Run Output

....*
...**
....*
.....
.....
*...#
***##
....#
.....
.....
#...#
.....
****#
.....
.....
#*..#
**...
*....
.....
.....
##..#
##...
#****
.....
.....
##..#
##...
.*...
**...
.*...
#***#
#.*..
.....
#....
.....
....*
#.#**
...*.
#....
.....
***.#
#*###
...#.
#....
.....
###.#
.....
...#.
#..**
...**
...

result:

ok good job!

Test #23:

score: 100
Accepted
time: 924ms
memory: 3672kb

First Run Input

prepare
1000
OT TL OI IL OT LO IT OT TI LI IL IT TO ZL LO IL IZ ZI ZI TZ OI IT ZO LZ TZ TL IO LO OT ZI TO TL OT IL ZO OZ IZ IL OT IL TO IL IL LZ ZL OZ ZL OT IT OI LI LO OL ZI TO IZ OI OZ LT OT IT TO LZ IZ OZ ZI TZ ZL ZT IO TO TZ TO OL OT LZ TO IT OL LT ZI TO IZ ZI ZO ZL IL TO IZ TI ZI IO ZL TO LO TO...

First Run Output

OTIIOLTOTLIIOLLIZIZTOTZLZTILOZOTOIZOILOITIILLZLOIIILOIOZOOLTTOLIZIZLZOOTOLOLTIOLZTIIOLIOITIIZTLOOTIITOLLTOZZTILZILZTLLTIZZTZIZIIZILOOLIZTTLZTTTOOOTLIZOIIIOILZOLIOLZLIOOLOZLTLTTOITILOTLOZIZOIOLOIIOIOOLTLLOLITTZLOITOIOIOTZZZOOILILLITZLIZOIOTLOLLZIZTZOTIZOLLZOZLZILOLLILTOLLIITTOOOLIOLZTIOOTOIOLLLIZZOOZ...

Second Run Input

play
1000
O
T
I
I
O
L
T
O
T
L
I
I
O
L
L
I
Z
I
Z
T
O
T
Z
L
Z
T
I
L
O
Z
O
T
O
I
Z
O
I
L
O
I
T
I
I
L
L
Z
L
O
I
I
I
L
O
I
O
Z
O
O
L
T
T
O
L
I
Z
I
Z
L
Z
O
O
T
O
L
O
L
T
I
O
L
Z
T
I
I
O
L
I
O
I
T
I
I
Z
T
L
O
O
T
I
I
T
O
L
L
T
O
Z
Z
T
I
L
Z
I
L
Z
T
L
L
T
I
Z
Z
T
Z
I
Z
I
I
Z
I
L
O
O
L
I
Z
T
T
L
Z
T
T
T
O
O
...

Second Run Output

**...
**...
.....
.....
.....
##...
##...
.*...
**...
.*...
#....
#****
.....
#....
.....
#....
.....
.....
#****
.....
#..**
...**
.....
.....
.....
#..##
...##
...*.
...*.
...**
#***#
..*.#
.....
.....
....#
**...
**#.#
.....
.....
....#
##***
###*#
.....
.....
....#
***..
*....
.....
.....
....#
...

result:

ok good job!

Test #24:

score: 100
Accepted
time: 885ms
memory: 3568kb

First Run Input

prepare
1000
IL LZ IZ OI OZ ZO TI ZI LT ZT IT TI ZI TO ZI LI IT TZ LI IO IZ LI IO LO ZL ZO LO LT ZL ZO ZL LO IO ZI ZT LZ OI TO OL LZ OL LZ ZT ZI ZT OZ IL TO ZL TO LT OI LZ LT IO LI LZ TL ZL OL LO IZ ZL IZ ZL ZT LZ IO IL OZ ZT ZI IL LZ IL LT IO TZ LT IZ ZL ZT OT IT ZO LT LO ZL LO TO LZ IO OZ LI ZL TO...

First Run Output

ILIIOZTITZTIZTIIIZIOIIIOLZLLLOLLOIZZIOLLLLZZTZIOLTTOZTOILLZLLIZILZZOIOTILLLLIZTIZTTIOLOZLOZIOILTTIILZTOZIZTTLZTLIZTZOTTIITZOLOLZIIOIZLLTTOTZZLILLOZTOLOLIZILOLZOLLOZLIOTOTZTLITOZTLZOTLOLTTLOIILLILOTLTTIIILTOIZLOZLTILLZITOTOIOTZLLZTTZLOIOOITOIIOLZOOTOOIOTTILOZLOTILTIZZLOOTIOILZZOZIOIOLLZILLIOLITLOZZOO...

Second Run Input

play
1000
I
L
I
I
O
Z
T
I
T
Z
T
I
Z
T
I
I
I
Z
I
O
I
I
I
O
L
Z
L
L
L
O
L
L
O
I
Z
Z
I
O
L
L
L
L
Z
Z
T
Z
I
O
L
T
T
O
Z
T
O
I
L
L
Z
L
L
I
Z
I
L
Z
Z
O
I
O
T
I
L
L
L
L
I
Z
T
I
Z
T
T
I
O
L
O
Z
L
O
Z
I
O
I
L
T
T
I
I
L
Z
T
O
Z
I
Z
T
T
L
Z
T
L
I
Z
T
Z
O
T
T
I
I
T
Z
O
L
O
L
Z
I
I
O
I
Z
L
L
T
T
O
T
Z
Z
L
I
L
L
...

Second Run Output

****.
.....
.....
.....
.....
####*
..***
.....
.....
.....
.****
..###
.....
.....
.....
.####
.*###
.*...
.*...
.*...
**###
**###
.....
.....
.....
....*
...**
...*.
.....
.....
.*..#
***##
...#.
.....
.....
.#..#
.*...
.*.#.
.*...
.*...
....#
.....
...#*
...**
....*
..**#
...**
...##
...##
....#
...

result:

ok good job!

Test #25:

score: 100
Accepted
time: 892ms
memory: 3676kb

First Run Input

prepare
1000
IZ TZ TI TZ OT TZ ZO OI LZ LZ ZT IL OI OT TL OI TI ZL LO OT LZ ZI ZL LI ZT LI LT IZ OT TO ZO IZ IT OT ZL OZ ZT ZT TL IL LI IZ LT LO OL ZT IZ ZL OZ LI IL OZ IT ZT ZO TZ OI LZ TZ ZI OT TO ZT OT IO IZ TO LI ZT TZ ZO OT LZ LO OZ TZ TZ ZO ZI ZI IZ ZT OL OL OL IZ LO ZI OL ZO IO ZO TI ZT IZ LI...

First Run Output

ITITOTOIZLZLIOTOILLOLIZLZILITOOIITLZZTTILILOOTILOLIZITZTIZTIOOZTIITIZZOTLLZTTZZZITOLOIOZLZOZITILOOZLIZLZZTITLIITILOIOIILLOTIIIZILITOITIZLZIZTOIZZLZLZTTTOOILLTIZTLZILITIOILZILZIZLZOIOTLZLOIIITOOOLITTILZITILILLLTZOOLOOOLTITIIIIOOLOOLOOZOIZOTOLZOTLLIOLZTLOILOILTOTIOLZLITILLLLOLZTLILOZZTIZILZTZTZITOIOTI...

Second Run Input

play
1000
I
T
I
T
O
T
O
I
Z
L
Z
L
I
O
T
O
I
L
L
O
L
I
Z
L
Z
I
L
I
T
O
O
I
I
T
L
Z
Z
T
T
I
L
I
L
O
O
T
I
L
O
L
I
Z
I
T
Z
T
I
Z
T
I
O
O
Z
T
I
I
T
I
Z
Z
O
T
L
L
Z
T
T
Z
Z
Z
I
T
O
L
O
I
O
Z
L
Z
O
Z
I
T
I
L
O
O
Z
L
I
Z
L
Z
Z
T
I
T
L
I
I
T
I
L
O
I
O
I
I
L
L
O
T
I
I
I
Z
I
L
I
T
O
I
T
I
Z
L
Z
I
Z
T
O
I
Z
Z
...

Second Run Output

****.
.....
.....
.....
.....
####*
...**
....*
.....
.....
.....
...##
****#
.....
.....
.*...
***##
.....
.....
.....
.#.**
...**
.....
.....
.....
.#.##
...##
...*.
...**
...*.
.#..#
....#
.....
**..#
**...
.#..#
****#
.....
##..#
##...
.#..#
.....
.....
##**#
##.**
.#..#
**...
.*...
.*...
##.##
...

result:

ok good job!

Test #26:

score: 100
Accepted
time: 901ms
memory: 3740kb

First Run Input

prepare
1000
IO LO IT TI ZL LT LZ ZT TL IL TO TO ZO LI IZ ZI LZ ZO IL ZT TZ OT TI ZT TO IO ZO IO TI OT TO OZ OI IT TI OL LT LO TO OI OL IZ ZO LZ ZT OT TO LT IO IT IZ LT TL TI LI OI LI IZ ZL ZI LI IT OT OI TZ ZI TI ZI OI TL IT ZO IZ TI IZ ZO ZO OL LT TO OT IZ TL LT ZL IZ LT IO IZ ZI LO LT LT LT LT LZ...

First Run Output

IOIILTZZTITTOLIZLZIZZOTTTIOOTOTOOITLLLOIOIOLZOOLOTITLIIOLIZILITOTZIZOLIZIIIOZLTOOILLLZTIIZOTTLLLLIZIIOITLOLZLIOOTLOLIZIZIITOIITTOOZLITOOOTLOTTOTLTTOZLOOZOZOZZZLIIIILITIOTOIIOOLOIILLIIOZLOOTOLZLTOOLLOOLIOLTIIZOZITTLIZIZTOILTOZLLTITOLLZZITLLZLIILZZZIZOIIOTTIITTIZLIIIILITLZIIZIIIZLITIILIZOTOTIOLOZIIOLZ...

Second Run Input

play
1000
I
O
I
I
L
T
Z
Z
T
I
T
T
O
L
I
Z
L
Z
I
Z
Z
O
T
T
T
I
O
O
T
O
T
O
O
I
T
L
L
L
O
I
O
I
O
L
Z
O
O
L
O
T
I
T
L
I
I
O
L
I
Z
I
L
I
T
O
T
Z
I
Z
O
L
I
Z
I
I
I
O
Z
L
T
O
O
I
L
L
L
Z
T
I
I
Z
O
T
T
L
L
L
L
I
Z
I
I
O
I
T
L
O
L
Z
L
I
O
O
T
L
O
L
I
Z
I
Z
I
I
T
O
I
I
T
T
O
O
Z
L
I
T
O
O
O
T
L
O
T
T
O
T
L
...

Second Run Output

****.
.....
.....
.....
.....
####.
.....
.....
**...
**...
####.
..*..
..*..
##*..
##*..
##.#.
...*.
...*.
##.*.
##.*.
##...
.....
.....
##***
##..*
##...
.*...
**...
.*...
##..#
#....
.....
#...*
...**
#..*#
#....
.....
#...#
**.##
#**##
#....
.....
#***#
##*##
.....
#****
.....
.....
.....
.....
...

result:

ok good job!

Test #27:

score: 100
Accepted
time: 892ms
memory: 3712kb

First Run Input

prepare
1000
TI OZ LT TO IO LO IO ZI TZ ZT IO TL ZO ZT OI ZT LZ OT LZ OT LZ ZL ZI LO OT TL ZI LZ IL LI IO OT TI OZ OZ LT IT LT OL IO OL OZ OL IO ZI TL OI OZ LZ ZT IL TL IO IO TO TO ZO OI ZL ZT ZI TL IL IL IZ LZ ZT LO ZO ZT LO LT TI IZ TI IL ZO TI TO LI LO OZ TO ZT LI IZ LI ZT IL TL IL TZ ZI IO ZL TO...

First Run Output

IZLTOLIITTITOTOZLOLOLZZLTTILIIIOIOOLTLOILOLIITOOLTITOOTOZOZTZTIIIZTOOTOLIIIIOTTIOOTTLILZILLZIILTZIITILZIZIZLOLOZOLOTLOIIIZTIOILZILZTOZZIILIZLZOOLITTLIZIZILITIIOTTLTILOLOITIIZTTIILOOZIZOLOOTIOTOIIZILIOTILZTTITZIZLTIIZTIZIZILZTZILOTIOLOILZZLIITILTOOITILLZIZOOZTTZILZZTOIZLLIOOZOIZLLLOITTTOTOZLTZITZZLOL...

Second Run Input

play
1000
I
Z
L
T
O
L
I
I
T
T
I
T
O
T
O
Z
L
O
L
O
L
Z
Z
L
T
T
I
L
I
I
I
O
I
O
O
L
T
L
O
I
L
O
L
I
I
T
O
O
L
T
I
T
O
O
T
O
Z
O
Z
T
Z
T
I
I
I
Z
T
O
O
T
O
L
I
I
I
I
O
T
T
I
O
O
T
T
L
I
L
Z
I
L
L
Z
I
I
L
T
Z
I
I
T
I
L
Z
I
Z
I
Z
L
O
L
O
Z
O
L
O
T
L
O
I
I
I
Z
T
I
O
I
L
Z
I
L
Z
T
O
Z
Z
I
I
L
I
Z
L
Z
O
O
L
...

Second Run Output

****.
.....
.....
.....
.....
####*
...**
...*.
.....
.....
*....
***##
...#.
.....
.....
#...*
...**
...#*
.....
.....
#...#
...##
...##
...**
...**
#..**
...#*
...#*
...#.
...#.
#...#
....#
****#
.....
.....
#...#
****#
.....
.....
.....
#***#
..*..
.....
.....
.....
....*
..#**
....*
.....
.....
...

result:

ok good job!

Test #28:

score: 100
Accepted
time: 907ms
memory: 3596kb

First Run Input

prepare
1000
OL TI LZ ZO IT TI IT OT IT OT TZ IL OT ZO TZ OI LI LO OL IT IT ZI IZ OT OT LT IZ LI ZT LO IZ LT TI LZ TL ZL ZO IZ LO LO TL IT TL LI LZ TO OT IL TO ZL LT OT LT IL LZ ZO ZL ZO ZT OI IZ IT OL ZO TL IT IZ TL ZL IO ZT LZ ZI ZL ZT LO OL ZL OT LO IZ IT ZL OZ TO IL IL IZ ZL LO ZO IZ IT IO OT LT...

First Run Output

LILOTITOITZIOOTOLOLTIIITOTZLTLITILTLOILLLITILTTITZLTLILOZOTIZILZTTILLITLILTOOLOOZTLZTIIILOZIIOOLTITZLTOOOLLZIOOLLILTITIOZOLLTIOOOTITZZLTZOTOTOLTZOZTLIZTITTIITTITZLITILOZIOTIIITTIOIOILZTOIILIZLIZIOTLTTILOZZZLIOIITITILOTLITZITLTLZLOLZIOIOLLILZZLOLZOLITILLITIILILTOTIIITOOOITLIIIZITIZIZLOOLOITOLTITTZZLI...

Second Run Input

play
1000
L
I
L
O
T
I
T
O
I
T
Z
I
O
O
T
O
L
O
L
T
I
I
I
T
O
T
Z
L
T
L
I
T
I
L
T
L
O
I
L
L
L
I
T
I
L
T
T
I
T
Z
L
T
L
I
L
O
Z
O
T
I
Z
I
L
Z
T
T
I
L
L
I
T
L
I
L
T
O
O
L
O
O
Z
T
L
Z
T
I
I
I
L
O
Z
I
I
O
O
L
T
I
T
Z
L
T
O
O
O
L
L
Z
I
O
O
L
L
I
L
T
I
T
I
O
Z
O
L
L
T
I
O
O
O
T
I
T
Z
Z
L
T
Z
O
T
O
T
O
L
T
Z
...

Second Run Output

***..
*....
.....
.....
.....
###..
#.*..
..*..
..*..
..*..
##...
#....
*....
*....
**...
.#.**
...**
.....
.....
.#...
.#.##
...##
...*.
...**
.#.*.
.#..#
****#
.....
....#
.#...
.#..#
.*...
**...
.*..#
.#...
**..#
**...
#....
....#
.....
##..#
##...
#****
....#
.....
##..#
##...
.*...
**..#
.*...
...

result:

ok good job!

Test #29:

score: 100
Accepted
time: 866ms
memory: 3640kb

First Run Input

prepare
1000
IT LT TZ OZ IT ZI TO IT IZ TZ TZ IZ ZT ZI IO TL OI OZ ZT LI ZI IO TL ZL OT ZT OT OZ LI ZT LO OT ZT LO OL TZ OL TO LT ZT LT IZ OT LO ZL ZL ZL ZL ZI TL TI IT ZL LI IZ ZI IL ZL IL IZ LT LT IO TO TZ LZ OI OT TO ZL TO LT TL ZL OL LO ZT TO ZO ZL OI TI LO ZO IO OZ LO LI OZ IO OT TL ZO LO TL TO...

First Run Output

TLZOIZTTZTZZTZOLIOTIZITZOTOOIZOTTOLZLTLZLZTLZLLZZTTTLIIZILIZLLIOTLOOOLOLLZLLTTZLOTLOOOLLZITTOLLTLLLOZLITTZLITOOTZIOZITOZZLLITIZLITTZLIOITOIZLILILITLIOOOOTLOITLZILLTZLZLTZIOIOOIOIOZOTZOZLZOZZLLZIZLIOOTOTLIITIIILOLOIOLLLTIZLZTZTITOOLIZIOZIOTLLTLOZILLZLLOLZZILTTIILLTIITITIILLILOILZTLTOTZOOOOLLIIOTILTII...

Second Run Input

play
1000
T
L
Z
O
I
Z
T
T
Z
T
Z
Z
T
Z
O
L
I
O
T
I
Z
I
T
Z
O
T
O
O
I
Z
O
T
T
O
L
Z
L
T
L
Z
L
Z
T
L
Z
L
L
Z
Z
T
T
T
L
I
I
Z
I
L
I
Z
L
L
I
O
T
L
O
O
O
L
O
L
L
Z
L
L
T
T
Z
L
O
T
L
O
O
O
L
L
Z
I
T
T
O
L
L
T
L
L
L
O
Z
L
I
T
T
Z
L
I
T
O
O
T
Z
I
O
Z
I
T
O
Z
Z
L
L
I
T
I
Z
L
I
T
T
Z
L
I
O
I
T
O
I
Z
L
I
L
I
L
...

Second Run Output

....*
...**
....*
.....
.....
*...#
***##
....#
.....
.....
#*..#
**...
*...#
.....
.....
##..#
##...
#...#
**...
**...
.#..#
.#...
****#
.#...
.#...
..**#
...**
.....
.....
.....
.*###
***##
.....
.....
.....
*####
**...
*....
.....
.....
....*
##.**
#..*.
.....
.....
.***#
##*##
#..#.
.....
.....
...

result:

ok good job!

Test #30:

score: 100
Accepted
time: 888ms
memory: 3904kb

First Run Input

prepare
1000
OT OZ TO LZ TL OI LT OZ OL TO OL ZT OZ LI TZ LT OZ IT OL LT LO IO ZO IL IO OI OT LO OZ LO TZ LO TO IZ ZO IT ZL LZ IZ LI OI IO ZO ZT OZ ZT ZI OI ZT LT ZL ZO TI OZ LZ OL ZI LT ZI LO OT IZ LT LI IZ ZO TZ ZL OT OL ZO OZ LZ TL ZT TO TZ ZT LI LI OZ OL TI OZ ZT IT IO ZI ZT TO LO IO LZ LT TZ ZO...

First Run Output

OOTLLILOLTOZOLTLZILTOIOLIIOLOOTLTIOIZLZLIIZTZTIOZTZZTOZLZLZLTILIIOZLOLZOLLTOZTIIOLTOTTIITOLIZTTOTLITLOLTLIZILOOITIZLILTITILZTOZIOILZTLLLOOTLZITZZLLOITLTOTIZTTTIITLIOIITOZLILZIOZILLLZTZOTTLZLTITIZIZLIITTZZOTLLZIIIOITZIOLOZLOTZILZOLZTIZIIZIZIITOZTTLITOTTTLLOTZLIZIILLOZTZLOIILITTLIIOOIITLIIIOTOZZZZLIZZ...

Second Run Input

play
1000
O
O
T
L
L
I
L
O
L
T
O
Z
O
L
T
L
Z
I
L
T
O
I
O
L
I
I
O
L
O
O
T
L
T
I
O
I
Z
L
Z
L
I
I
Z
T
Z
T
I
O
Z
T
Z
Z
T
O
Z
L
Z
L
Z
L
T
I
L
I
I
O
Z
L
O
L
Z
O
L
L
T
O
Z
T
I
I
O
L
T
O
T
T
I
I
T
O
L
I
Z
T
T
O
T
L
I
T
L
O
L
T
L
I
Z
I
L
O
O
I
T
I
Z
L
I
L
T
I
T
I
L
Z
T
O
Z
I
O
I
L
Z
T
L
L
L
O
O
T
L
Z
I
T
Z
Z
...

Second Run Output

**...
**...
.....
.....
.....
##.**
##.**
.....
.....
.....
##.##
##.##
.*...
**...
.*...
#..##
#..##
...*.
#..*.
...**
#..*#
#***#
.....
#....
....#
#..##
.....
.....
#****
....#
#..##
...**
....*
....*
....#
#..#.
...#.
.....
**...
**...
#..#.
...#.
...*.
##.*.
##.**
#*...
**...
.*...
##...
##..#
...

result:

ok good job!

Test #31:

score: 100
Accepted
time: 872ms
memory: 3900kb

First Run Input

prepare
1000
OZ LT IZ TZ OL OZ TO IL ZO LZ ZO IL ZL TO TO OI OL ZT ZI IZ OI ZL LO TI ZO OI TO ZT LT ZT LT LO TI OT OI TL OT OI LZ IL IZ TZ LO ZL LI IZ ZI OI LO IL OZ ZL OL LI OL IL IT TL ZT OI ZI TL LZ LZ OT LZ IZ TZ ZO TL TO OZ ZT OI TL OT ZL LI TL LI ZT ZI LI IT OT TL OL TO LZ IT OT TL IT IO IO LO...

First Run Output

OTIZLOTLOLOIZTTILZIIIZLIOIOTTZTLIOOLOOLLIZOZLIIOLLOZOILLILTOITZZOLZZZLOZZOLOZITIZZIIOLLOZIOTIIILLTOLTZIZZOOOITZILOOITZLTTILLIIIOZLLIIIIOTOITZLTOITTLITOZOLIOOLLOLLZZZLZZLTTLLLILOIZOOLIOITOOLOTTTLIOTOOTZOOLIOLIZLLLILOITITTILOZITOILTOIZLIZIILIITITITIIOOZOTTLILZLTOOIZILILOIZILIIOLZZITLOOLZTLTIOLOZLLLITZ...

Second Run Input

play
1000
O
T
I
Z
L
O
T
L
O
L
O
I
Z
T
T
I
L
Z
I
I
I
Z
L
I
O
I
O
T
T
Z
T
L
I
O
O
L
O
O
L
L
I
Z
O
Z
L
I
I
O
L
L
O
Z
O
I
L
L
I
L
T
O
I
T
Z
Z
O
L
Z
Z
Z
L
O
Z
Z
O
L
O
Z
I
T
I
Z
Z
I
I
O
L
L
O
Z
I
O
T
I
I
I
L
L
T
O
L
T
Z
I
Z
Z
O
O
O
I
T
Z
I
L
O
O
I
T
Z
L
T
T
I
L
L
I
I
I
O
Z
L
L
I
I
I
I
O
T
O
I
T
Z
L
T
O
I
...

Second Run Output

**...
**...
.....
.....
.....
##...
##...
.*...
**...
.*...
#....
#****
.....
#....
.....
#*...
**...
*....
#....
.....
##...
##...
#*...
#*...
**...
**...
**...
.....
.....
.....
##...
##...
.*...
**...
.*...
#..**
#...*
....*
#....
.....
#..##
#...#
....#
#..**
...**
#..#.
#***.
...*.
#..#.
...#.
...

result:

ok good job!

Test #32:

score: 100
Accepted
time: 904ms
memory: 3588kb

First Run Input

prepare
1000
TL LT IO LZ OT TI LT ZL IZ OL TI ZT OL ZT OL ZT IZ IO IZ IT TI TO TO IT TL TI IT TZ TI TI ZT TO ZI TI LZ ZO LI TZ TL LI OL TO ZO LI IZ ZI IO OI IZ IT OZ OI OT TO IZ IZ ZL TO LT TO LT IO ZI TZ OT ZI TO OT IZ TL IO IZ IL LT LZ IT LT LT TI LZ TL ZL ZI LO LO TO ZI IL ZT LI IZ LT LT LT LI IZ...

First Run Output

LLILOTLZZLIZLTOTIIIIITTITIITTITTIILOIZLILOOLIIIOIIZOTTZIZOLTTOIZOZOTITIIITLILLTLLLZOLOZLZLILLLLIITTILIZOOTILIIOOOZIOIOITTZLLIIZLIZLOTILLTIOTIIOOOILIITZIOILIILLLIIOTIZOILZZOTOOLOOOLLLOZOLLZITILTLTZLZOLTTZIOZILOOLLOTZOITTZZLLOZZTLLOLTLTOILZTLILIOZOILZIZTLLOZIOTIOIOLILIILOLTIOOLLOTZTTTOTOZZTIITOLZOILLZ...

Second Run Input

play
1000
L
L
I
L
O
T
L
Z
Z
L
I
Z
L
T
O
T
I
I
I
I
I
T
T
I
T
I
I
T
T
I
T
T
I
I
L
O
I
Z
L
I
L
O
O
L
I
I
I
O
I
I
Z
O
T
T
Z
I
Z
O
L
T
T
O
I
Z
O
Z
O
T
I
T
I
I
I
T
L
I
L
L
T
L
L
L
Z
O
L
O
Z
L
Z
L
I
L
L
L
L
I
I
T
T
I
L
I
Z
O
O
T
I
L
I
I
O
O
O
Z
I
O
I
O
I
T
T
Z
L
L
I
I
Z
L
I
Z
L
O
T
I
L
L
T
I
O
T
I
I
O
O
O
...

Second Run Output

***..
*....
.....
.....
.....
###**
#...*
....*
.....
.....
.....
#...#
****#
.....
.....
...*.
#***#
.....
.....
.....
**.#.
**...
.....
.....
.....
##.#.
##...
.*...
**...
.*...
#..#.
#....
.....
#...*
..***
#..#.
#....
.....
#**.#
**###
#..#.
#...*
...**
###*#
.....
#..#.
#...#
***##
*....
.....
...

result:

ok good job!

Test #33:

score: 100
Accepted
time: 925ms
memory: 3940kb

First Run Input

prepare
1000
TO LO ZO OL OT LI ZO TL ZI IT OL TL TZ IL IO ZL ZI IT IZ OL OL IT OT IZ LI IT LT ZT TO ZT TL TO IL OL ZI ZL LT ZL OL LT LI OI LZ ZI OT IL LZ ZI IT ZO ZI LO LT TL ZL IL TZ ZI OZ ZT OI TZ TZ LI ZO IL LO OI OT IZ IL IT OI TO IL OT OI IZ OL TO ZI OL IZ TO OT OL ZI ZL TO IT LI IO ZT ZT TO LZ...

First Run Output

OLZOTIZTZILTZLIZITILLITILILZOZLTLOIZLZLTLILZTILZIOIOLLZITIZTITTIOILIOILTITITIIOTZOIOTLIZTILOZTOLZLOLLLOLOOTTOIIIOLTLZTOTIILLOLTIOITOLLZTIIITLIZOTZLZIIIZTOTOLZILIOLOOOTLZZIZOZIOIILTILLLIZLZOLOLOTTLOOTLTIOTLTTOLILTOLZTTOLOTLOTZIZTOTLITOLTOZLILLLLOOLLTOILTLOITLILZIILLITOZLILZZOTTLZTOOTTTLOZLZIOILZOLOLT...

Second Run Input

play
1000
O
L
Z
O
T
I
Z
T
Z
I
L
T
Z
L
I
Z
I
T
I
L
L
I
T
I
L
I
L
Z
O
Z
L
T
L
O
I
Z
L
Z
L
T
L
I
L
Z
T
I
L
Z
I
O
I
O
L
L
Z
I
T
I
Z
T
I
T
T
I
O
I
L
I
O
I
L
T
I
T
I
T
I
I
O
T
Z
O
I
O
T
L
I
Z
T
I
L
O
Z
T
O
L
Z
L
O
L
L
L
O
L
O
O
T
T
O
I
I
I
O
L
T
L
Z
T
O
T
I
I
L
L
O
L
T
I
O
I
T
O
L
L
Z
T
I
I
I
T
L
I
Z
O
T
...

Second Run Output

**...
**...
.....
.....
.....
##..*
##***
.....
.....
.....
##**#
...**
.....
.....
.....
**...
**.##
.....
.....
.....
##...
##.##
.*...
**...
.*...
#....
#..##
.....
#****
.....
#.**.
#**##
.....
.....
.....
#.##*
...**
....*
.....
.....
#*###
**.##
*...#
.....
.....
.....
##.##
#...#
.....
****.
...

result:

ok good job!

Test #34:

score: 100
Accepted
time: 885ms
memory: 3736kb

First Run Input

prepare
1000
IZ TL OZ ZO TL ZT IL OZ LZ ZL ZT ZL IT OT IZ TZ IO TO IT LI IL OI TI IO OT OL IO OZ ZT TI TI OI TO OL LT IZ ZI IT ZI IT IT OT IZ LO LO OZ ZI TO TO LZ TI ZL LT IL LZ LZ TZ IL TO ZL IT OT OI IT IT IO OZ IO OZ TZ ZO LI IZ LT ZI LI OZ LO LO OZ IO IO IL TI TZ LO TO OL TL ZT IT LI IZ ZO TO LI...

First Run Output

ILOOTTLOLZZLITZTOTILIIIITLIOTIIOTLLIITIITOIOLOZTTZIZLLLLTITLTOOIIOOIZTZIILILOLLOIOLTZLTLLTILIZOIITITZILZLOILLZTIITIOITLOLOLLLIIOOLZLITZZIZIITZOLTTITOZLOTLOOITTTLTLIIOLZOIZTLIIOZIZLTZILLZIZTLTOTLOLOLILTLOLOOLLIOLZLLZLOIZOTIZTTLIIIOLZITZIIZOIOLLZLTLZTIOITLOZOOITOIIOZTTOIOITLLIZOZIIIOLZITOZLOTZTLTOILZI...

Second Run Input

play
1000
I
L
O
O
T
T
L
O
L
Z
Z
L
I
T
Z
T
O
T
I
L
I
I
I
I
T
L
I
O
T
I
I
O
T
L
L
I
I
T
I
I
T
O
I
O
L
O
Z
T
T
Z
I
Z
L
L
L
L
T
I
T
L
T
O
O
I
I
O
O
I
Z
T
Z
I
I
L
I
L
O
L
L
O
I
O
L
T
Z
L
T
L
L
T
I
L
I
Z
O
I
I
T
I
T
Z
I
L
Z
L
O
I
L
L
Z
T
I
I
T
I
O
I
T
L
O
L
O
L
L
L
I
I
O
O
L
Z
L
I
T
Z
Z
I
Z
I
I
T
Z
O
L
T
...

Second Run Output

****.
.....
.....
.....
.....
####*
..***
.....
.....
.....
**...
**###
.....
.....
.....
##.**
...**
.....
.....
.....
##.##
...##
...*.
...**
...*.
##..#
....#
.....
.*..#
***..
##..#
**..#
*....
*#..#
###..
.#**#
.#**#
.....
.#..#
.##..
*####
*####
**...
.#..#
.##..
.....
.....
#....
..**#
..#**
...

result:

ok good job!

Test #35:

score: 0
Stage 1: Program answer Runtime Error

First Run Input

prepare
1000
OT OT LO IL IT ZI LI IL LO LI TZ TL ZT ZT IL ZL ZO OT ZI IL ZI OT TZ ZO OL TZ OZ OL IO IO TI OI LI ZT OI TL ZO TZ ZL IL IO TO IZ OZ TO IL IL LO LI IT IO OL LT LO ZL LZ IT TI OT IT OI TL IL TI LT LT ZT TO OZ IT TZ TO LT OT IL TL ZI OI TZ TZ IO TI OL OT TO IO OI IO LZ OL LO OI LO TL TI IL...

First Run Output


Second Run Input


Second Run Output


result: