QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#521460#2199. Intriguing SelectionsocpiteAC ✓36ms3876kbC++231.3kb2024-08-16 11:05:222024-08-16 11:05:22

Judging History

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

  • [2024-08-16 11:05:22]
  • 评测
  • 测评结果:AC
  • 用时:36ms
  • 内存:3876kb
  • [2024-08-16 11:05:22]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;

const int maxn = 205;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

vector<int> g[maxn], rg[maxn];

bool vis[maxn];
bool asked[maxn][maxn];

void dfs(int x, int &cnt){
    vis[x] = 1;
    cnt++;
    for(auto v: g[x])if(!vis[v])dfs(v, cnt);
}

void rdfs(int x, int &cnt){
    vis[x] = 1;
    cnt++;
    for(auto v: rg[x])if(!vis[v])rdfs(v, cnt);
}

bool query(int a, int b){
    cout << "? " << a << " " << b << endl;
    char c;
    cin >> c;
    return c == '<';
}

void solve(int n){
    int arr[4] = {1, 2, 3, 0};
    vector<int> lower;
    // arr[0] < arr[1], arr[2] < arr[3]
    for(int i = 4; i <= 2*n; i++){
        for(int j = 0; j < 4; j++)if(!arr[j])arr[j] = i;
        if(!query(arr[0], arr[1]))swap(arr[0], arr[1]);
        if(!query(arr[2], arr[3]))swap(arr[2], arr[3]);
        if(query(arr[0], arr[2])){
            lower.push_back(arr[0]);
            arr[0] = 0;
        }
        else {
            lower.push_back(arr[2]);
            arr[2] = 0; 
        }
    }
    sort(lower.begin(), lower.end(), query);
    cout << "!" << endl;
}

int main() {
    int t;
    cin >> t;
    while(t--){
        int n;
        cin >> n;
        solve(n);
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3700kb

input:

2
3
>
>
>
<
<
>
<
<
>
<
<
3
<
<
<
<
<
<
>
<
>
>
>
>
>

output:

? 1 2
? 3 4
? 2 4
? 2 1
? 5 3
? 2 5
? 2 1
? 6 3
? 2 6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

result:

ok 535 cases

Test #5:

score: 0
Accepted
time: 0ms
memory: 3708kb

input:

400
5
>
>
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
>
>
<
<
>
>
<
<
<
>
>
<
<
<
<
>
>
<
<
<
<
>
5
>
>
<
<
<
<
<
<
<
<
<
>
<
>
>
<
>
<
<
<
<
>
>
>
<
>
>
>
>
>
>
>
>
<
<
>
5
<
<
<
<
<
<
<
<
<
>
<
>
<
<
>
<
>
<
<
<
<
<
>
<
>
>
>
<
>
>
>
<
>
5
<
<
>
<
<
>
<
<
<
<
<
<
>
<
<
<
<
<
<
<
<
>
>
>
>
>
<
>
>
>
...

output:

? 1 2
? 3 4
? 2 4
? 5 1
? 4 3
? 5 4
? 6 1
? 4 3
? 1 4
? 1 6
? 7 3
? 1 7
? 1 6
? 8 3
? 1 8
? 1 6
? 9 3
? 1 9
? 1 6
? 10 3
? 1 10
? 5 2
? 4 5
? 4 2
? 7 5
? 7 4
? 7 2
? 7 5
? 8 5
? 8 4
? 8 2
? 8 7
? 8 5
? 9 5
? 9 4
? 9 2
? 9 7
? 9 8
? 9 5
? 10 5
? 10 4
? 10 2
? 10 7
? 10 8
? 10 9
!
? 1 2
? 3 4
? 2 4
? ...

result:

ok 400 cases

Test #6:

score: 0
Accepted
time: 17ms
memory: 3712kb

input:

400
5
<
>
>
<
<
>
<
<
>
<
>
<
>
<
>
<
<
>
<
<
>
<
>
<
>
>
>
>
>
>
<
<
<
>
>
<
>
5
<
>
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
<
<
>
>
>
>
>
<
>
>
>
<
>
>
>
5
<
<
>
<
<
>
<
<
>
<
>
>
<
>
>
<
>
>
<
<
>
<
<
>
>
>
>
>
>
<
5
<
<
<
<
<
<
>
<
>
<
>
<
<
<
<
<
<
<
>
<
>
<
>
>
>
>
>
<
>
<
>
>
5
<
<
<
<
<
<
<
<
<
>
<
...

output:

? 1 2
? 3 4
? 1 4
? 1 2
? 5 3
? 1 5
? 1 2
? 6 3
? 1 6
? 1 2
? 7 3
? 1 3
? 8 2
? 3 7
? 2 3
? 2 8
? 9 7
? 2 9
? 2 8
? 10 7
? 2 10
? 5 4
? 6 5
? 6 4
? 6 5
? 1 5
? 1 4
? 3 5
? 3 1
? 9 5
? 9 3
? 9 1
? 9 4
? 9 6
? 10 5
? 10 3
? 10 1
!
? 1 2
? 3 4
? 1 4
? 5 2
? 4 3
? 5 4
? 6 2
? 4 3
? 6 4
? 7 2
? 4 3
? 7 4...

result:

ok 400 cases

Test #7:

score: 0
Accepted
time: 23ms
memory: 3852kb

input:

290
5
<
<
>
<
>
<
<
<
<
<
<
<
<
<
<
>
<
<
<
<
<
>
>
>
<
>
<
<
>
>
>
>
5
<
>
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
>
>
<
>
<
<
>
<
<
<
>
>
<
<
<
<
<
>
5
>
>
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
>
>
>
>
>
>
>
<
>
>
>
>
<
<
<
>
5
<
>
>
<
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
>
>
>
>
>
>
<
<
>
>
<
>
>
...

output:

? 1 2
? 3 4
? 1 3
? 1 2
? 5 4
? 1 4
? 6 2
? 4 5
? 6 4
? 7 2
? 4 5
? 7 4
? 8 2
? 4 5
? 8 4
? 9 2
? 4 5
? 2 4
? 10 9
? 4 5
? 10 4
? 1 3
? 1 3
? 6 3
? 6 1
? 6 3
? 7 3
? 8 7
? 2 8
? 2 1
? 10 8
? 10 2
!
? 1 2
? 3 4
? 1 4
? 1 2
? 5 3
? 1 3
? 6 2
? 3 5
? 6 3
? 7 2
? 3 5
? 7 3
? 8 2
? 3 5
? 8 3
? 9 2
? 3 5
...

result:

ok 290 cases

Test #8:

score: 0
Accepted
time: 7ms
memory: 3640kb

input:

277
6
<
>
<
<
<
<
<
<
>
<
<
>
<
>
<
<
<
<
<
<
>
<
<
>
<
<
>
<
>
>
>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 12 7
? 2 12
? 5 3
? 5 3
? 4 3
? 4 5
? 6 3
? 6 4
? 8 3
? 8 6
? 8 4
? 8 5
? 8 3
? 9 3
? 9 6
? 9 4
? 9 5
? 9 8
? 10 3
? 10 6
? 10 4
? 10 5
? 10 9
?...

result:

ok 277 cases

Test #10:

score: 0
Accepted
time: 29ms
memory: 3612kb

input:

256
6
<
>
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
>
>
>
>
>
>
<
>
>
<
<
<
>
>
<
<
<
>
>
<
<
<
<
<
<
>
<
6
>
>
<
<
<
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
>
>
>
>
<
>
>
>
<
<
<
>
>
<
<
>
>
<
<
<
>
>
<
<
<
<
>
6
<
<
>
<
<
<
>
<
>
<
<
<
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
>
>
>
>
>
>
>
<
<
...

output:

? 1 2
? 3 4
? 1 4
? 1 2
? 5 3
? 1 5
? 1 2
? 6 3
? 1 6
? 1 2
? 7 3
? 1 7
? 8 2
? 7 3
? 8 7
? 9 2
? 7 3
? 9 7
? 10 2
? 7 3
? 10 7
? 11 2
? 7 3
? 11 7
? 12 2
? 7 3
? 12 7
? 5 4
? 5 4
? 6 4
? 6 5
? 1 4
? 1 6
? 8 4
? 8 1
? 8 6
? 9 4
? 9 1
? 9 8
? 9 6
? 9 5
? 10 4
? 10 1
? 10 8
? 10 6
? 10 9
? 11 4
? 11 1...

result:

ok 256 cases

Test #11:

score: 0
Accepted
time: 12ms
memory: 3700kb

input:

204
7
<
>
>
<
<
>
<
>
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
>
>
>
>
>
<
>
>
>
>
<
<
<
<
>
>
<
<
<
<
<
<
>
>
>
>
<
>
>
<
<
<
<
<
>
7
<
<
>
<
<
>
<
>
>
<
<
>
<
<
<
<
<
<
<
<
<
>
<
<
<
<
<
<
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

result:

ok 204 cases

Test #13:

score: 0
Accepted
time: 5ms
memory: 3608kb

input:

204
7
<
>
<
>
<
<
>
<
<
<
<
<
<
<
<
>
<
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
>
>
>
>
>
<
<
>
>
<
<
<
>
>
>
>
>
>
<
<
<
>
>
<
<
<
<
>
>
<
<
<
<
<
<
<
<
>
>
>
7
>
>
>
<
<
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
>
>
>
>
>
<
>
>
<
>
>
<
>
>
<
<
<
>
>
>
>
<
<
<
<
<
<
>
>
<
<
<
<
<
<
<
>
>
<
<
...

output:

? 1 2
? 3 4
? 1 4
? 5 2
? 4 3
? 2 4
? 6 5
? 4 3
? 5 4
? 7 6
? 4 3
? 7 4
? 8 6
? 4 3
? 8 4
? 9 6
? 4 3
? 6 4
? 6 9
? 10 3
? 6 3
? 11 9
? 3 10
? 11 3
? 12 9
? 3 10
? 12 3
? 13 9
? 3 10
? 13 3
? 14 9
? 3 10
? 14 3
? 2 1
? 2 1
? 5 1
? 5 2
? 7 1
? 7 5
? 7 2
? 7 1
? 8 1
? 8 5
? 8 2
? 8 7
? 8 1
? 4 1
? 4 5...

result:

ok 204 cases

Test #14:

score: 0
Accepted
time: 28ms
memory: 3588kb

input:

204
7
>
>
<
>
<
<
<
<
<
<
<
<
>
<
>
<
>
<
>
<
>
<
<
<
>
<
>
<
<
>
<
<
>
>
>
<
<
>
>
>
>
>
>
>
>
>
>
>
<
<
<
<
<
>
>
<
>
7
<
>
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
>
>
>
>
>
>
<
<
>
>
<
<
>
>
<
>
>
<
<
<
>
>
<
<
<
<
<
<
>
>
<
<
<
<
<
<
<
>
>
<
<
>
>
>
7
<
<
<
<
<
>
<
<
>
<
<
>
...

output:

? 1 2
? 3 4
? 2 4
? 5 1
? 4 3
? 1 4
? 6 5
? 4 3
? 6 4
? 7 5
? 4 3
? 7 4
? 8 5
? 4 3
? 5 4
? 5 8
? 9 3
? 5 3
? 10 8
? 3 9
? 8 3
? 8 10
? 11 9
? 8 11
? 12 10
? 11 9
? 10 11
? 10 12
? 13 9
? 10 13
? 10 12
? 14 9
? 10 14
? 1 2
? 1 2
? 6 2
? 7 6
? 4 7
? 4 1
? 5 7
? 5 4
? 3 7
? 3 5
? 8 7
? 8 3
? 11 7
? 11...

result:

ok 204 cases

Test #15:

score: 0
Accepted
time: 4ms
memory: 3800kb

input:

185
7
<
>
>
<
>
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
>
<
<
>
>
>
<
>
>
>
>
<
<
>
>
<
<
<
<
>
>
<
<
<
<
<
>
>
>
>
<
<
<
<
>
>
<
<
<
<
<
>
>
>
7
>
>
<
>
<
<
<
<
<
<
<
>
<
>
>
<
<
>
<
<
>
<
<
>
<
>
<
<
<
>
<
<
>
>
>
>
>
>
>
>
>
>
>
>
<
<
>
>
<
<
<
>
>
>
>
>
>
>
7
<
>
<
>
<
<
<
<
>
<
>
<
<
...

output:

? 1 2
? 3 4
? 1 4
? 1 2
? 5 3
? 1 3
? 6 2
? 3 5
? 6 3
? 7 2
? 3 5
? 7 3
? 7 2
? 8 5
? 7 8
? 7 2
? 9 5
? 7 9
? 7 2
? 10 5
? 7 10
? 7 2
? 11 5
? 7 11
? 12 2
? 11 5
? 12 11
? 13 2
? 11 5
? 13 11
? 14 2
? 11 5
? 2 11
? 1 4
? 1 4
? 6 4
? 6 1
? 6 4
? 3 4
? 3 1
? 8 4
? 8 3
? 8 1
? 8 6
? 9 4
? 9 3
? 9 1
? 9...

result:

ok 185 cases

Test #16:

score: 0
Accepted
time: 17ms
memory: 3700kb

input:

156
8
<
>
>
<
>
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
>
>
>
>
>
<
<
>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10
? 14 8
? 1 14
? 1 10
? 15 8
? 1 15
? 1 10
? 16 8
? 1 16
? 5 4
? 6 5
? 6 4
? 6 5
? 7 5
? 7 4
? 7 6
? 2 5...

result:

ok 156 cases

Test #18:

score: 0
Accepted
time: 20ms
memory: 3576kb

input:

156
8
<
<
>
<
<
<
>
<
>
<
<
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
>
>
>
>
<
<
>
>
>
>
<
<
>
>
<
<
<
<
>
<
>
<
<
<
<
<
<
<
>
>
<
<
<
<
<
<
<
<
>
>
<
<
<
<
<
<
<
<
<
>
>
<
<
<
<
<
<
<
<
<
<
>
<
8
>
>
<
>
<
<
<
<
<
>
<
>
<
>
<
<
<
<
<
<
<
>
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
>
<
>
>
>
>
...

output:

? 1 2
? 3 4
? 1 3
? 1 2
? 5 4
? 1 5
? 6 2
? 5 4
? 2 5
? 2 6
? 7 4
? 2 7
? 2 6
? 8 4
? 2 4
? 9 6
? 4 8
? 9 4
? 10 6
? 4 8
? 10 4
? 11 6
? 4 8
? 11 4
? 12 6
? 4 8
? 12 4
? 13 6
? 4 8
? 13 4
? 14 6
? 4 8
? 14 4
? 15 6
? 4 8
? 15 4
? 16 6
? 4 8
? 16 4
? 1 3
? 1 3
? 5 3
? 5 1
? 7 3
? 7 5
? 7 1
? 7 3
? 2 ...

result:

ok 156 cases

Test #19:

score: 0
Accepted
time: 13ms
memory: 3676kb

input:

156
8
<
>
<
>
<
<
>
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
>
>
>
>
>
<
>
>
>
<
<
<
<
<
>
>
<
<
<
<
<
>
>
<
<
<
>
>
<
<
<
>
>
<
<
<
<
<
<
<
>
>
<
<
<
<
<
>
>
<
<
>
8
>
>
>
<
<
>
<
>
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
>
<
<
>
<
<
>
<
>
<
<
>
>
>
>
>
>
<
>
<
<
<
<
<
>
...

output:

? 1 2
? 3 4
? 1 4
? 5 2
? 4 3
? 2 4
? 6 5
? 4 3
? 5 4
? 5 6
? 7 3
? 5 7
? 5 6
? 8 3
? 5 8
? 5 6
? 9 3
? 5 9
? 10 6
? 9 3
? 10 9
? 11 6
? 9 3
? 11 9
? 12 6
? 9 3
? 12 9
? 13 6
? 9 3
? 13 9
? 14 6
? 9 3
? 14 9
? 15 6
? 9 3
? 15 9
? 16 6
? 9 3
? 16 9
? 2 1
? 2 1
? 4 1
? 4 2
? 7 1
? 7 4
? 8 1
? 5 8
? 5 ...

result:

ok 156 cases

Test #20:

score: 0
Accepted
time: 7ms
memory: 3704kb

input:

156
8
<
<
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
>
>
>
>
<
<
>
>
<
>
>
<
<
>
>
<
<
>
>
<
<
<
<
>
>
<
<
<
<
>
>
>
>
<
<
<
>
>
>
>
<
<
<
<
<
<
<
<
<
<
<
>
8
<
<
<
>
<
>
<
>
<
>
<
<
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
>
>
>
>
>
>
>
<
>
>
>
>
<
<
<
...

output:

? 1 2
? 3 4
? 1 3
? 5 2
? 3 4
? 5 3
? 5 2
? 6 4
? 5 6
? 7 2
? 6 4
? 7 6
? 8 2
? 6 4
? 8 6
? 9 2
? 6 4
? 9 6
? 10 2
? 6 4
? 10 6
? 11 2
? 6 4
? 11 6
? 12 2
? 6 4
? 12 6
? 13 2
? 6 4
? 13 6
? 14 2
? 6 4
? 14 6
? 15 2
? 6 4
? 15 6
? 16 2
? 6 4
? 16 6
? 3 1
? 3 1
? 5 1
? 5 3
? 7 1
? 7 5
? 7 3
? 7 1
? 8 ...

result:

ok 156 cases

Test #21:

score: 0
Accepted
time: 12ms
mem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3
? 1 7
? 1 8
? 9 3
? 1 3
? 10 8
? 3 9
? 10 3
? 11 8
? 3 9
? 11 3
? 12 8
? 3 9
? 12 3
? 13 8
? 3 9
? 13 3
? 14 8
? 3 9
? 14 3
? 14 8
? 15 9
? 14 15
? 16 8
? 15 9
? 16 15
? 2 4
? 2 4
? 5 4
? 5 2
? 6 4
? 6 5
? 7 4
? 7 6
...

result:

ok 124 cases

Test #23:

score: 0
Accepted
time: 18ms
memory: 3592kb

input:

123
9
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
>
>
<
>
<
>
<
>
>
>
<
<
<
>
<
>
<
<
<
<
<
<
>
>
<
<
<
<
<
>
>
<
<
<
<
<
>
>
<
<
<
<
<
<
<
<
>
>
>
>
<
<
<
<
<
<
<
<
<
<
<
<
>
>
<
<
<
<
<
>
9
<
<
<
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
...

output:

? 1 2
? 3 4
? 1 3
? 1 2
? 5 4
? 1 5
? 6 2
? 5 4
? 6 5
? 7 2
? 5 4
? 7 5
? 8 2
? 5 4
? 8 5
? 9 2
? 5 4
? 2 5
? 2 9
? 10 4
? 2 10
? 2 9
? 11 4
? 2 11
? 2 9
? 12 4
? 2 12
? 2 9
? 13 4
? 2 13
? 2 9
? 14 4
? 2 14
? 2 9
? 15 4
? 2 15
? 2 9
? 16 4
? 2 16
? 2 9
? 17 4
? 2 17
? 2 9
? 18 4
? 2 18
? 1 3
? 1 3
...

result:

ok 123 cases

Test #24:

score: 0
Accepted
time: 12ms
memory: 3608kb

input:

123
9
<
>
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
>
<
<
<
>
<
>
>
>
>
>
>
<
<
<
>
>
<
<
<
<
<
<
>
>
<
<
<
<
>
<
>
<
<
<
<
<
<
<
>
>
<
<
<
<
<
<
<
<
<
<
>
<
9
>
<
<
<
<
>
<
<
<
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
>
>
...

output:

? 1 2
? 3 4
? 1 4
? 1 2
? 5 3
? 1 3
? 1 2
? 6 5
? 1 6
? 1 2
? 7 5
? 1 7
? 1 2
? 8 5
? 1 8
? 1 2
? 9 5
? 1 9
? 1 2
? 10 5
? 1 10
? 11 2
? 10 5
? 2 10
? 12 11
? 10 5
? 12 10
? 13 11
? 10 5
? 13 10
? 14 11
? 10 5
? 14 10
? 15 11
? 10 5
? 15 10
? 16 11
? 10 5
? 16 10
? 17 11
? 10 5
? 17 10
? 18 11
? 10 ...

result:

ok 123 cases

Test #25:

score: 0
Accepted
time: 30ms
memory: 3876kb

input:

123
9
<
<
>
<
>
<
<
<
<
>
<
>
<
>
>
<
>
>
<
<
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
>
>
>
>
>
>
>
>
>
>
>
<
<
<
<
<
>
>
>
>
<
>
>
<
<
>
>
<
<
<
<
<
<
>
>
<
<
<
<
<
>
>
<
<
<
<
<
<
>
>
<
<
<
<
<
>
>
<
<
<
<
<
<
<
<
<
<
>
9
<
>
<
>
<
>
<
>
>
<
>
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
...

output:

? 1 2
? 3 4
? 1 3
? 1 2
? 5 4
? 1 4
? 6 2
? 4 5
? 6 4
? 7 2
? 4 5
? 2 4
? 2 7
? 8 5
? 2 5
? 2 7
? 9 8
? 2 8
? 2 7
? 10 9
? 2 10
? 2 7
? 11 9
? 2 9
? 2 7
? 12 11
? 2 12
? 2 7
? 13 11
? 2 13
? 2 7
? 14 11
? 2 14
? 2 7
? 15 11
? 2 15
? 2 7
? 16 11
? 2 16
? 2 7
? 17 11
? 2 17
? 2 7
? 18 11
? 2 18
? 1 3
...

result:

ok 123 cases

Test #26:

score: 0
Accepted
time: 18ms
memory: 3640kb

input:

123
9
>
>
>
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
>
>
<
>
>
>
>
<
<
<
>
>
<
>
>
>
>
<
<
<
<
<
>
>
<
<
<
>
>
<
<
>
>
<
<
<
<
<
<
<
<
>
>
<
<
>
>
<
<
<
<
>
>
<
<
<
<
<
<
<
<
>
>
<
>
9
>
>
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
>
<
<
...

output:

? 1 2
? 3 4
? 2 4
? 2 1
? 5 3
? 2 5
? 6 1
? 5 3
? 6 5
? 7 1
? 5 3
? 1 5
? 1 7
? 8 3
? 1 8
? 1 7
? 9 3
? 1 9
? 1 7
? 10 3
? 1 3
? 11 7
? 3 10
? 11 3
? 12 7
? 3 10
? 12 3
? 13 7
? 3 10
? 13 3
? 14 7
? 3 10
? 14 3
? 15 7
? 3 10
? 15 3
? 16 7
? 3 10
? 16 3
? 17 7
? 3 10
? 17 3
? 18 7
? 3 10
? 18 3
? 2 4...

result:

ok 123 cases

Test #27:

score: 0
Accepted
time: 19ms
memory: 3588kb

input:

123
9
>
>
<
>
<
>
<
>
>
<
<
>
<
>
>
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
>
>
>
>
>
<
<
>
>
>
>
>
>
>
>
<
<
<
<
<
<
>
>
>
>
<
<
<
<
<
>
>
<
<
<
<
<
<
<
>
>
<
<
<
<
<
<
<
<
<
>
>
<
<
<
<
<
<
<
>
>
<
<
<
<
<
<
<
<
<
<
>
>
<
<
<
<
<
<
>
9
>
>
>
<
>
>
<
<
>
<
<
<
<
<
<
<
<
<
>
<
<
...

output:

? 1 2
? 3 4
? 2 4
? 5 1
? 4 3
? 1 4
? 1 5
? 6 3
? 1 3
? 1 5
? 7 6
? 1 7
? 1 5
? 8 6
? 1 6
? 1 5
? 9 8
? 1 9
? 10 5
? 9 8
? 10 9
? 11 5
? 9 8
? 11 9
? 12 5
? 9 8
? 12 9
? 12 5
? 13 8
? 12 13
? 12 5
? 14 8
? 12 14
? 12 5
? 15 8
? 12 15
? 12 5
? 16 8
? 12 16
? 12 5
? 17 8
? 12 17
? 12 5
? 18 8
? 12 18
...

result:

ok 123 cases

Test #28:

score: 0
Accepted
time: 25ms
memory: 3612kb

input:

123
9
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
<
>
>
>
>
>
>
>
>
<
<
<
>
>
>
>
<
<
<
>
>
<
<
<
<
<
<
<
<
>
>
<
<
<
<
<
<
>
>
<
>
>
<
<
<
<
<
>
<
>
<
<
<
>
9
>
>
>
<
<
>
<
<
>
<
>
>
<
<
<
<
<
>
<
<
>
<
<
>
<
>
>
<
<
>
<
<
>
<
<
<
>
<
>
<
<
>
<
<
<
...

output:

? 1 2
? 3 4
? 1 3
? 1 2
? 5 4
? 1 5
? 1 2
? 6 4
? 1 6
? 1 2
? 7 4
? 1 7
? 8 2
? 7 4
? 8 7
? 9 2
? 7 4
? 2 7
? 2 9
? 10 4
? 2 10
? 2 9
? 11 4
? 2 11
? 2 9
? 12 4
? 2 12
? 2 9
? 13 4
? 2 13
? 2 9
? 14 4
? 2 14
? 2 9
? 15 4
? 2 15
? 2 9
? 16 4
? 2 16
? 2 9
? 17 4
? 2 17
? 2 9
? 18 4
? 2 18
? 5 3
? 6 5
...

result:

ok 123 cases

Test #29:

score: 0
Accepted
time: 8ms
memory: 3636kb

input:

123
9
>
<
<
<
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
<
<
<
<
<
<
<
>
>
>
>
>
>
>
<
<
<
>
>
>
<
>
>
>
<
>
>
<
<
<
<
<
>
>
<
<
<
<
<
<
<
<
<
>
>
<
<
<
<
<
<
<
<
<
>
>
>
>
<
<
<
<
<
<
<
<
<
<
>
>
<
<
<
<
<
<
<
<
<
<
<
<
>
9
>
<
>
<
<
<
<
<
>
<
<
>
<
>
<
<
<
>
<
<
>
<
>
>
<
...

output:

? 1 2
? 3 4
? 2 3
? 5 1
? 3 4
? 5 3
? 6 1
? 3 4
? 1 3
? 7 6
? 3 4
? 6 3
? 8 7
? 3 4
? 8 3
? 9 7
? 3 4
? 9 3
? 10 7
? 3 4
? 10 3
? 11 7
? 3 4
? 11 3
? 11 7
? 12 4
? 11 12
? 11 7
? 13 4
? 11 13
? 11 7
? 14 4
? 11 14
? 11 7
? 15 4
? 11 15
? 11 7
? 16 4
? 11 4
? 17 7
? 4 16
? 17 4
? 18 7
? 4 16
? 18 4
?...

result:

ok 123 cases

Test #30:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

103
9
<
<
>
<
<
<
>
<
>
<
<
>
<
<
>
<
<
<
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
>
>
>
>
>
<
<
>
>
>
>
>
>
>
>
<
<
>
>
>
>
>
>
<
<
<
<
<
<
>
>
<
<
<
<
<
<
<
<
<
>
>
>
>
<
>
>
<
<
<
<
<
<
>
9
<
<
>
<
<
<
<
<
<
<
<
>
<
<
<
<
<
<
<
<
<
>
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
>
>
...

output:

? 1 2
? 3 4
? 1 3
? 1 2
? 5 4
? 1 5
? 6 2
? 5 4
? 2 5
? 2 6
? 7 4
? 2 7
? 2 6
? 8 4
? 2 8
? 2 6
? 9 4
? 2 9
? 10 6
? 9 4
? 10 9
? 10 6
? 11 4
? 10 11
? 10 6
? 12 4
? 10 12
? 13 6
? 12 4
? 13 12
? 14 6
? 12 4
? 14 12
? 15 6
? 12 4
? 15 12
? 16 6
? 12 4
? 6 12
? 6 16
? 17 4
? 6 17
? 6 16
? 18 4
? 6 18...

result:

ok 103 cases

Test #31:

score: 0
Accepted
time: 11ms
memory: 3704kb

input:

100
10
>
<
<
<
<
<
<
<
<
>
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
>
<
<
<
<
<
>
<
>
<
<
<
<
<
<
>
<
<
>
<
<
>
>
<
<
>
>
>
>
>
>
<
<
>
>
<
<
<
>
>
<
<
<
>
>
>
>
<
<
<
<
>
>
<
<
<
<
<
<
<
>
>
<
<
<
<
>
>
>
>
>
<
>
10
<
<
>
<
>
<
<
<
<
>
<
<
<
<
<
<
<
...

output:

? 1 2
? 3 4
? 2 3
? 5 1
? 3 4
? 5 3
? 6 1
? 3 4
? 6 3
? 7 1
? 3 4
? 1 3
? 1 7
? 8 4
? 1 8
? 1 7
? 9 4
? 1 9
? 10 7
? 9 4
? 10 9
? 11 7
? 9 4
? 11 9
? 12 7
? 9 4
? 12 9
? 13 7
? 9 4
? 13 9
? 14 7
? 9 4
? 7 9
? 7 14
? 15 4
? 7 15
? 7 14
? 16 4
? 7 16
? 7 14
? 17 4
? 7 17
? 7 14
? 18 4
? 7 18
? 7 14
? ...

result:

ok 100 cases

Test #32:

score: 0
Accepted
time: 8ms
memory: 3708kb

input:

100
10
<
>
>
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
<
<
<
<
<
<
<
>
<
<
<
>
<
>
<
>
<
>
>
<
>
>
>
<
<
>
>
<
>
<
>
>
<
<
>
>
<
>
>
<
<
<
>
>
<
<
<
>
<
>
<
<
<
<
<
<
>
>
<
<
<
<
>
>
>
>
<
>
>
<
<
>
>
<
<
<
>
>
>
>
<
<
<
>
>
10
>
>
>
<
<
>
<
<
>
<
<
>
<
<
>
<
...

output:

? 1 2
? 3 4
? 1 4
? 1 2
? 5 3
? 1 5
? 6 2
? 5 3
? 6 5
? 7 2
? 5 3
? 2 5
? 2 7
? 8 3
? 2 8
? 2 7
? 9 3
? 2 9
? 2 7
? 10 3
? 2 10
? 11 7
? 10 3
? 7 10
? 7 11
? 12 3
? 7 12
? 7 11
? 13 3
? 7 13
? 7 11
? 14 3
? 7 14
? 7 11
? 15 3
? 7 15
? 7 11
? 16 3
? 7 16
? 7 11
? 17 3
? 7 17
? 7 11
? 18 3
? 7 3
? 19 ...

result:

ok 100 cases

Test #33:

score: 0
Accepted
time: 4ms
memory: 3636kb

input:

100
10
<
>
>
<
>
<
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
>
>
>
>
>
<
<
>
<
>
<
>
<
<
<
<
<
>
>
<
>
<
<
<
>
<
>
>
<
<
<
>
>
<
<
<
>
>
>
>
<
>
>
>
>
<
<
<
>
>
<
<
>
>
<
<
<
>
>
<
>
>
<
<
<
<
>
>
>
<
<
<
<
<
<
>
10
<
<
>
<
>
>
<
>
>
<
>
<
<
<
<
>
<
<
...

output:

? 1 2
? 3 4
? 1 4
? 1 2
? 5 3
? 1 3
? 6 2
? 3 5
? 6 3
? 7 2
? 3 5
? 7 3
? 8 2
? 3 5
? 2 3
? 2 8
? 9 5
? 2 9
? 2 8
? 10 5
? 2 10
? 2 8
? 11 5
? 2 11
? 2 8
? 12 5
? 2 12
? 2 8
? 13 5
? 2 13
? 14 8
? 13 5
? 14 13
? 15 8
? 13 5
? 15 13
? 16 8
? 13 5
? 16 13
? 17 8
? 13 5
? 17 13
? 18 8
? 13 5
? 18 13
? ...

result:

ok 100 cases

Test #34:

score: 0
Accepted
time: 22ms
memory: 3640kb

input:

100
10
>
>
<
>
<
<
<
<
<
>
<
>
<
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
<
<
<
<
<
<
<
<
<
<
>
<
<
<
>
>
>
>
<
<
<
>
>
<
<
<
>
<
>
<
>
>
<
<
>
<
>
>
>
>
>
>
>
<
<
<
>
>
>
>
<
<
<
<
>
>
<
<
<
<
<
>
>
<
<
<
<
<
<
<
>
>
<
<
<
<
<
<
<
<
>
>
>
>
<
<
<
<
<
<
<
<
<
>
<
<
<
<
<
<
<
<
>...

output:

? 1 2
? 3 4
? 2 4
? 5 1
? 4 3
? 1 4
? 6 5
? 4 3
? 6 4
? 7 5
? 4 3
? 5 4
? 5 7
? 8 3
? 5 8
? 9 7
? 8 3
? 7 8
? 10 9
? 8 3
? 9 8
? 11 10
? 8 3
? 10 8
? 12 11
? 8 3
? 12 8
? 13 11
? 8 3
? 13 8
? 13 11
? 14 3
? 13 14
? 13 11
? 15 3
? 13 15
? 13 11
? 16 3
? 13 16
? 13 11
? 17 3
? 13 17
? 13 11
? 18 3
? 1...

result:

ok 100 cases

Test #35:

score: 0
Accepted
time: 17ms
memory: 3640kb

input:

100
10
<
<
>
<
<
<
>
<
<
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
<
<
>
<
>
<
>
<
>
<
>
>
<
<
>
>
<
<
<
<
<
>
<
>
<
<
<
<
<
>
>
<
>
>
<
<
>
>
<
<
<
<
<
<
<
>
>
<
<
<
<
<
<
<
<
<
<
<
>
>
>
>
>
>
<
>
<
>
10
<
>
>
<
>
>
<
<
>
...

output:

? 1 2
? 3 4
? 1 3
? 1 2
? 5 4
? 1 5
? 6 2
? 5 4
? 2 5
? 7 6
? 5 4
? 7 5
? 8 6
? 5 4
? 6 5
? 9 8
? 5 4
? 9 5
? 10 8
? 5 4
? 10 5
? 11 8
? 5 4
? 11 5
? 12 8
? 5 4
? 12 5
? 12 8
? 13 4
? 12 13
? 12 8
? 14 4
? 12 14
? 12 8
? 15 4
? 12 15
? 12 8
? 16 4
? 12 16
? 12 8
? 17 4
? 12 4
? 18 8
? 4 17
? 8 4
? 1...

result:

ok 100 cases

Test #36:

score: 0
Accepted
time: 12ms
memory: 3804kb

input:

100
10
<
>
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
>
>
<
<
>
<
<
>
<
>
>
<
<
<
>
>
<
<
<
>
<
>
<
>
<
>
<
<
<
<
<
<
<
<
>
>
<
<
<
<
<
<
<
>
>
<
<
<
<
<
<
<
<
<
<
>
>
<
<
<
<
<
<
<
<
<
>
>
>
>
<
>
>
<
>
>
10
>
<
>
...

output:

? 1 2
? 3 4
? 1 4
? 1 2
? 5 3
? 1 5
? 6 2
? 5 3
? 6 5
? 7 2
? 5 3
? 7 5
? 8 2
? 5 3
? 8 5
? 9 2
? 5 3
? 9 5
? 10 2
? 5 3
? 10 5
? 11 2
? 5 3
? 11 5
? 11 2
? 12 3
? 11 3
? 11 2
? 13 12
? 11 13
? 11 2
? 14 12
? 11 14
? 11 2
? 15 12
? 11 15
? 11 2
? 16 12
? 11 16
? 17 2
? 16 12
? 17 16
? 18 2
? 16 12
?...

result:

ok 100 cases

Test #37:

score: 0
Accepted
time: 20ms
memory: 3580kb

input:

100
10
>
>
>
<
<
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
<
<
>
<
<
<
<
<
<
<
<
>
>
<
<
<
<
>
<
>
<
>
<
>
>
>
>
>
>
>
>
>
<
<
<
<
>
>
<
<
<
>
>
<
<
<
<
<
<
>
>
<
<
<
<
<
>
>
<
<
<
<
>
>
<
<
<
<
>
>
<
<
<
<
<
<
<
<
>
>
>
<
<
<
<
<
<
<
<
<
<
>
10
...

output:

? 1 2
? 3 4
? 2 4
? 2 1
? 5 3
? 2 5
? 2 1
? 6 3
? 2 3
? 2 1
? 7 6
? 2 7
? 2 1
? 8 6
? 2 8
? 2 1
? 9 6
? 2 9
? 2 1
? 10 6
? 2 10
? 11 1
? 10 6
? 1 10
? 1 11
? 12 6
? 1 12
? 1 11
? 13 6
? 1 13
? 1 11
? 14 6
? 1 14
? 1 11
? 15 6
? 1 15
? 1 11
? 16 6
? 1 16
? 1 11
? 17 6
? 1 17
? 1 11
? 18 6
? 1 18
? 1 ...

result:

ok 100 cases

Test #38:

score: 0
Accepted
time: 7ms
memory: 3584kb

input:

100
10
>
<
>
<
>
<
<
<
<
<
<
<
>
<
<
<
<
<
<
<
<
>
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
<
>
<
<
<
<
>
<
>
>
>
<
>
>
<
>
>
<
<
>
>
<
>
<
>
>
<
<
>
<
>
<
<
<
<
>
>
<
<
<
<
<
>
>
<
<
<
>
>
<
<
<
<
<
<
>
>
<
<
<
<
<
<
>
>
<
<
<
<
>
>
<
<
<
<
<
<
<
<
>
>
>
>
<
>
>
<
<
>
>
<
<
>
>
10
<
...

output:

? 1 2
? 3 4
? 2 3
? 2 1
? 5 4
? 2 4
? 6 1
? 4 5
? 6 4
? 7 1
? 4 5
? 7 4
? 8 1
? 4 5
? 1 4
? 9 8
? 4 5
? 9 4
? 10 8
? 4 5
? 10 4
? 11 8
? 4 5
? 8 4
? 12 11
? 4 5
? 12 4
? 13 11
? 4 5
? 11 4
? 11 13
? 14 5
? 11 14
? 11 13
? 15 5
? 11 15
? 11 13
? 16 5
? 11 16
? 11 13
? 17 5
? 11 17
? 11 13
? 18 5
? 11...

result:

ok 100 cases

Test #39:

score: 0
Accepted
time: 11ms
memory: 3844kb

input:

100
10
>
<
<
<
<
<
<
<
<
<
<
<
>
<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
? 11 7
? 3 10
? 11 3
? 12 7
? 3 10
? 12 3
? 13 7
? 3 10
? 7 3
? 14 13
? 3 10
? 14 3
? 15 13
? 3 10
? 15 3
? 16 13
? 3 10
? 16 3
? 17 13
? 3 10
? 17 3
? 18 13
? 3 10
? 18 3
?...

result:

ok 34 cases

Test #41:

score: 0
Accepted
time: 13ms
memory: 3708kb

input:

8
30
<
<
>
<
<
<
>
<
>
<
>
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
<
<
<
>
<
<
>
<...

output:

? 1 2
? 3 4
? 1 3
? 1 2
? 5 4
? 1 5
? 6 2
? 5 4
? 2 5
? 2 6
? 7 4
? 2 4
? 2 6
? 8 7
? 2 8
? 9 6
? 8 7
? 9 8
? 10 6
? 8 7
? 10 8
? 11 6
? 8 7
? 11 8
? 12 6
? 8 7
? 12 8
? 13 6
? 8 7
? 13 8
? 14 6
? 8 7
? 14 8
? 15 6
? 8 7
? 15 8
? 16 6
? 8 7
? 16 8
? 17 6
? 8 7
? 17 8
? 18 6
? 8 7
? 18 8
? 19 6
? 8 7...

result:

ok 8 cases

Test #42:

score: 0
Accepted
time: 9ms
memory: 3572kb

input:

6
38
>
>
>
<
<
<
>
<
>
<
>
<
<
<
<
<
<
<
<
<
>
<
<
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
>
<
<
<
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
<...

output:

? 1 2
? 3 4
? 2 4
? 2 1
? 5 3
? 2 5
? 6 1
? 5 3
? 1 5
? 1 6
? 7 3
? 1 3
? 8 6
? 3 7
? 8 3
? 9 6
? 3 7
? 9 3
? 10 6
? 3 7
? 10 3
? 10 6
? 11 7
? 10 11
? 10 6
? 12 7
? 10 7
? 13 6
? 7 12
? 13 7
? 14 6
? 7 12
? 14 7
? 15 6
? 7 12
? 15 7
? 16 6
? 7 12
? 16 7
? 17 6
? 7 12
? 6 7
? 6 17
? 18 12
? 6 18
? 1...

result:

ok 6 cases

Test #43:

score: 0
Accepted
time: 16ms
memory: 3820kb

input:

4
44
<
<
<
>
<
>
<
<
<
>
<
<
<
<
<
<
<
>
<
<
>
<
>
>
<
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<...

output:

? 1 2
? 3 4
? 1 3
? 5 2
? 3 4
? 2 3
? 2 5
? 6 4
? 2 6
? 7 5
? 6 4
? 5 6
? 8 7
? 6 4
? 8 6
? 9 7
? 6 4
? 9 6
? 9 7
? 10 4
? 9 10
? 9 7
? 11 4
? 9 4
? 9 7
? 12 11
? 9 11
? 13 7
? 11 12
? 7 11
? 14 13
? 11 12
? 14 11
? 15 13
? 11 12
? 15 11
? 16 13
? 11 12
? 16 11
? 17 13
? 11 12
? 17 11
? 18 13
? 11 1...

result:

ok 4 cases

Test #44:

score: 0
Accepted
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
? 8 2
? 3 4
? 2 3
? 2 8
? 9 4
? 2 9
? 10 8
? 9 4
? 10 9
? 11 8
? 9 4
? 11 9
? 12 8
? 9 4
? 12 9
? 13 8
? 9 4
? 13 9
? 14 8
? 9 4
? 14 9
? 15 8
? 9 4
? 15 9
? 16 8
? 9 4
? 16 9
? 17 8
? 9 4
? 17 9
? 18 8
? 9 4
? 18 9
? 19 8
? 9 4...

result:

ok 3 cases

Test #46:

score: 0
Accepted
time: 5ms
memory: 3636kb

input:

3
55
>
>
<
<
<
<
>
<
>
<
<
<
<
<
<
>
<
>
<
>
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
>
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<...

output:

? 1 2
? 3 4
? 2 4
? 5 1
? 4 3
? 5 4
? 6 1
? 4 3
? 1 4
? 1 6
? 7 3
? 1 7
? 8 6
? 7 3
? 8 7
? 9 6
? 7 3
? 6 7
? 6 9
? 10 3
? 6 3
? 11 9
? 3 10
? 11 3
? 12 9
? 3 10
? 12 3
? 12 9
? 13 10
? 12 13
? 12 9
? 14 10
? 12 14
? 12 9
? 15 10
? 12 15
? 16 9
? 15 10
? 16 15
? 16 9
? 17 10
? 16 17
? 16 9
? 18 10
?...

result:

ok 3 cases

Test #47:

score: 0
Accepted
time: 3ms
memory: 3864kb

input:

2
58
>
<
<
<
<
>
<
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
<
<
<
<
<
<
<
<
<
>
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<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17 4
? 6 17
? 6 2
? 18 4
? 6 4
? 19 2
? 4 18...

result:

ok 2 cases

Test #49:

score: 0
Accepted
time: 0ms
memory: 3712kb

input:

2
62
>
>
<
>
<
<
<
<
<
>
<
<
<
<
<
>
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<...

output:

? 1 2
? 3 4
? 2 4
? 5 1
? 4 3
? 1 4
? 6 5
? 4 3
? 6 4
? 7 5
? 4 3
? 5 4
? 8 7
? 4 3
? 8 4
? 9 7
? 4 3
? 7 4
? 10 9
? 4 3
? 10 4
? 11 9
? 4 3
? 11 4
? 11 9
? 12 3
? 11 12
? 11 9
? 13 3
? 11 13
? 11 9
? 14 3
? 11 14
? 11 9
? 15 3
? 11 15
? 11 9
? 16 3
? 11 16
? 11 9
? 17 3
? 11 17
? 11 9
? 18 3
? 11 1...

result:

ok 2 cases

Test #50:

score: 0
Accepted
time: 3ms
memory: 3676kb

input:

2
64
>
<
<
<
<
>
<
<
>
<
<
>
<
<
<
<
<
>
<
<
>
<
<
>
<
>
>
<
<
>
<
<
>
<
>
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<...

output:

? 1 2
? 3 4
? 2 3
? 5 1
? 3 4
? 5 3
? 5 1
? 6 4
? 5 6
? 5 1
? 7 4
? 5 7
? 5 1
? 8 4
? 5 8
? 9 1
? 8 4
? 9 8
? 9 1
? 10 4
? 9 10
? 9 1
? 11 4
? 9 11
? 9 1
? 12 4
? 9 4
? 9 1
? 13 12
? 9 13
? 9 1
? 14 12
? 9 14
? 9 1
? 15 12
? 9 12
? 9 1
? 16 15
? 9 15
? 17 1
? 15 16
? 17 15
? 18 1
? 15 16
? 18 15
? 1...

result:

ok 2 cases

Test #51:

score: 0
Accepted
time: 6ms
memory: 3876kb

input:

2
66
>
>
<
<
<
<
<
<
<
>
<
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
>
<...

output:

? 1 2
? 3 4
? 2 4
? 5 1
? 4 3
? 5 4
? 6 1
? 4 3
? 6 4
? 7 1
? 4 3
? 1 4
? 1 7
? 8 3
? 1 3
? 9 7
? 3 8
? 9 3
? 10 7
? 3 8
? 10 3
? 11 7
? 3 8
? 11 3
? 12 7
? 3 8
? 12 3
? 13 7
? 3 8
? 13 3
? 13 7
? 14 8
? 13 14
? 13 7
? 15 8
? 13 15
? 13 7
? 16 8
? 13 16
? 13 7
? 17 8
? 13 17
? 13 7
? 18 8
? 13 18
? ...

result:

ok 2 cases

Test #52:

score: 0
Accepted
time: 0ms
memory: 3572kb

input:

2
68
<
<
<
>
<
>
<
>
<
<
<
>
<
<
>
<
>
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
>
<
<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12
? 5 10
? 14 5
? 15 12
? 5 10
? 15 5
? 16 12
? 5 10
? 16 5
? 17 12
? 5 10
? 17 5
? 18 12
? 5 10
? 18 5
...

result:

ok 2 cases

Test #54:

score: 0
Accepted
time: 5ms
memory: 3640kb

input:

1
72
<
>
>
<
<
<
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<...

output:

? 1 2
? 3 4
? 1 4
? 1 2
? 5 3
? 1 5
? 6 2
? 5 3
? 6 5
? 6 2
? 7 3
? 6 7
? 6 2
? 8 3
? 6 8
? 9 2
? 8 3
? 9 8
? 10 2
? 8 3
? 10 8
? 11 2
? 8 3
? 11 8
? 12 2
? 8 3
? 12 8
? 13 2
? 8 3
? 13 8
? 14 2
? 8 3
? 14 8
? 15 2
? 8 3
? 15 8
? 16 2
? 8 3
? 16 8
? 17 2
? 8 3
? 17 8
? 17 2
? 18 3
? 17 18
? 17 2
? 1...

result:

ok 1 cases

Test #55:

score: 0
Accepted
time: 10ms
memory: 3700kb

input:

1
73
>
<
>
<
>
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<...

output:

? 1 2
? 3 4
? 2 3
? 2 1
? 5 4
? 2 4
? 2 1
? 6 5
? 2 6
? 2 1
? 7 5
? 2 7
? 2 1
? 8 5
? 2 8
? 9 1
? 8 5
? 9 8
? 10 1
? 8 5
? 10 8
? 11 1
? 8 5
? 11 8
? 12 1
? 8 5
? 12 8
? 13 1
? 8 5
? 13 8
? 13 1
? 14 5
? 13 14
? 13 1
? 15 5
? 13 15
? 13 1
? 16 5
? 13 16
? 13 1
? 17 5
? 13 17
? 18 1
? 17 5
? 18 17
? ...

result:

ok 1 cases

Test #56:

score: 0
Accepted
time: 3ms
memory: 3632kb

input:

1
74
>
>
>
<
<
>
<
>
<
<
<
<
<
<
>
<
<
>
<
<
>
<
>
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<...

output:

? 1 2
? 3 4
? 2 4
? 2 1
? 5 3
? 2 5
? 2 1
? 6 3
? 2 3
? 7 1
? 3 6
? 7 3
? 8 1
? 3 6
? 8 3
? 8 1
? 9 6
? 8 9
? 8 1
? 10 6
? 8 10
? 8 1
? 11 6
? 8 6
? 12 1
? 6 11
? 12 6
? 12 1
? 13 11
? 12 13
? 12 1
? 14 11
? 12 14
? 12 1
? 15 11
? 12 15
? 12 1
? 16 11
? 12 16
? 12 1
? 17 11
? 12 17
? 12 1
? 18 11
? ...

result:

ok 1 cases

Test #57:

score: 0
Accepted
time: 10ms
memory: 3872kb

input:

1
75
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<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3
? 12 2
? 3 10
? 12 3
? 13 2
? 3 10
? 2 3
? 2 13
? 14 10
? 2 14
? 2 13
? 15 10
? 2 15
? 2 13
? 16 10
? 2 16
? 2 13
? 17 10
? 2 17
? 2 13
? 18 10
? 2 18
?...

result:

ok 1 cases

Test #59:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

1
77
>
<
>
<
>
<
<
<
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<...

output:

? 1 2
? 3 4
? 2 3
? 2 1
? 5 4
? 2 4
? 6 1
? 4 5
? 6 4
? 6 1
? 7 5
? 6 5
? 8 1
? 5 7
? 8 5
? 9 1
? 5 7
? 9 5
? 10 1
? 5 7
? 10 5
? 11 1
? 5 7
? 11 5
? 12 1
? 5 7
? 12 5
? 13 1
? 5 7
? 13 5
? 14 1
? 5 7
? 14 5
? 15 1
? 5 7
? 15 5
? 15 1
? 16 7
? 15 16
? 17 1
? 16 7
? 17 16
? 18 1
? 16 7
? 18 16
? 19 1...

result:

ok 1 cases

Test #60:

score: 0
Accepted
time: 11ms
memory: 3636kb

input:

1
78
>
>
>
<
<
>
<
<
>
<
<
>
<
>
<
<
<
<
<
<
<
<
<
<
>
<
>
<
<
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<...

output:

? 1 2
? 3 4
? 2 4
? 2 1
? 5 3
? 2 5
? 2 1
? 6 3
? 2 6
? 2 1
? 7 3
? 2 7
? 2 1
? 8 3
? 2 3
? 9 1
? 3 8
? 9 3
? 10 1
? 3 8
? 10 3
? 11 1
? 3 8
? 11 3
? 12 1
? 3 8
? 1 3
? 1 12
? 13 8
? 1 13
? 1 12
? 14 8
? 1 8
? 1 12
? 15 14
? 1 15
? 1 12
? 16 14
? 1 16
? 1 12
? 17 14
? 1 17
? 1 12
? 18 14
? 1 18
? 1 ...

result:

ok 1 cases

Test #61:

score: 0
Accepted
time: 2ms
memory: 3580kb

input:

1
79
>
<
>
<
<
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
>
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>...

output:

? 1 2
? 3 4
? 2 3
? 2 1
? 5 4
? 2 5
? 2 1
? 6 4
? 2 4
? 7 1
? 4 6
? 7 4
? 8 1
? 4 6
? 8 4
? 9 1
? 4 6
? 9 4
? 10 1
? 4 6
? 10 4
? 11 1
? 4 6
? 11 4
? 11 1
? 12 6
? 11 6
? 13 1
? 6 12
? 13 6
? 13 1
? 14 12
? 13 14
? 13 1
? 15 12
? 13 15
? 13 1
? 16 12
? 13 16
? 13 1
? 17 12
? 13 17
? 13 1
? 18 12
? 1...

result:

ok 1 cases

Test #62:

score: 0
Accepted
time: 1ms
memory: 3552kb

input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 8
? 6 9
? 6 2
? 10 8
? 6 10
? 6 2
? 11 8
? 6 11
? 6 2
? 12 8
? 6 12
? 6 2
? 13 8
? 6 13
? 6 2
? 14 8
? 6 14
? 6 2
? 15 8
? 6 15
? 6 2
? 16 8
? 6 16
? 6 2
? 17 8
? 6 17
? 6 2
? 18 8
? 6 18
? 6 2
? 19 8...

result:

ok 1 cases

Test #64:

score: 0
Accepted
time: 6ms
memory: 3640kb

input:

1
82
<
>
>
<
<
>
<
<
>
<
>
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<...

output:

? 1 2
? 3 4
? 1 4
? 1 2
? 5 3
? 1 5
? 1 2
? 6 3
? 1 6
? 1 2
? 7 3
? 1 3
? 1 2
? 8 7
? 1 8
? 1 2
? 9 7
? 1 9
? 1 2
? 10 7
? 1 10
? 11 2
? 10 7
? 11 10
? 12 2
? 10 7
? 12 10
? 13 2
? 10 7
? 13 10
? 14 2
? 10 7
? 14 10
? 15 2
? 10 7
? 15 10
? 16 2
? 10 7
? 16 10
? 17 2
? 10 7
? 17 10
? 18 2
? 10 7
? 18...

result:

ok 1 cases

Test #65:

score: 0
Accepted
time: 3ms
memory: 3708kb

input:

1
83
>
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
<
<
<
<
<
<
>
<
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<...

output:

? 1 2
? 3 4
? 2 4
? 5 1
? 4 3
? 1 4
? 6 5
? 4 3
? 6 4
? 7 5
? 4 3
? 7 4
? 8 5
? 4 3
? 8 4
? 9 5
? 4 3
? 9 4
? 10 5
? 4 3
? 10 4
? 11 5
? 4 3
? 5 4
? 12 11
? 4 3
? 12 4
? 13 11
? 4 3
? 13 4
? 14 11
? 4 3
? 11 4
? 11 14
? 15 3
? 11 3
? 11 14
? 16 15
? 11 16
? 11 14
? 17 15
? 11 17
? 11 14
? 18 15
? 11...

result:

ok 1 cases

Test #66:

score: 0
Accepted
time: 7ms
memory: 3872kb

input:

1
84
>
>
>
<
>
>
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
<
>
<
<
<
<
<
<
<
<...

output:

? 1 2
? 3 4
? 2 4
? 2 1
? 5 3
? 2 3
? 2 1
? 6 5
? 2 6
? 7 1
? 6 5
? 1 6
? 8 7
? 6 5
? 8 6
? 9 7
? 6 5
? 9 6
? 10 7
? 6 5
? 10 6
? 11 7
? 6 5
? 7 6
? 7 11
? 12 5
? 7 12
? 7 11
? 13 5
? 7 13
? 7 11
? 14 5
? 7 14
? 7 11
? 15 5
? 7 15
? 7 11
? 16 5
? 7 16
? 7 11
? 17 5
? 7 17
? 7 11
? 18 5
? 7 5
? 7 11
...

result:

ok 1 cases

Test #67:

score: 0
Accepted
time: 11ms
memory: 3640kb

input:

1
85
>
>
<
>
<
<
<
<
<
<
<
>
<
<
>
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<...

output:

? 1 2
? 3 4
? 2 4
? 5 1
? 4 3
? 1 4
? 6 5
? 4 3
? 6 4
? 7 5
? 4 3
? 7 4
? 7 5
? 8 3
? 7 8
? 7 5
? 9 3
? 7 9
? 10 5
? 9 3
? 5 9
? 11 10
? 9 3
? 11 9
? 12 10
? 9 3
? 12 9
? 13 10
? 9 3
? 13 9
? 14 10
? 9 3
? 14 9
? 15 10
? 9 3
? 15 9
? 16 10
? 9 3
? 16 9
? 17 10
? 9 3
? 17 9
? 18 10
? 9 3
? 18 9
? 19 ...

result:

ok 1 cases

Test #68:

score: 0
Accepted
time: 0ms
memory: 3868kb

input:

1
86
<
<
>
<
<
<
<
<
<
>
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<...

output:

? 1 2
? 3 4
? 1 3
? 1 2
? 5 4
? 1 5
? 6 2
? 5 4
? 6 5
? 7 2
? 5 4
? 2 5
? 8 7
? 5 4
? 8 5
? 9 7
? 5 4
? 7 5
? 7 9
? 10 4
? 7 10
? 7 9
? 11 4
? 7 11
? 7 9
? 12 4
? 7 12
? 7 9
? 13 4
? 7 13
? 7 9
? 14 4
? 7 14
? 7 9
? 15 4
? 7 15
? 7 9
? 16 4
? 7 16
? 7 9
? 17 4
? 7 17
? 18 9
? 17 4
? 18 17
? 19 9
? 1...

result:

ok 1 cases

Test #69:

score: 0
Accepted
time: 0ms
memory: 3840kb

input:

1
87
>
<
>
<
<
>
<
>
<
>
<
<
<
<
>
<
>
>
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<...

output:

? 1 2
? 3 4
? 2 3
? 2 1
? 5 4
? 2 5
? 2 1
? 6 4
? 2 4
? 7 1
? 4 6
? 1 4
? 8 7
? 4 6
? 8 4
? 8 7
? 9 6
? 8 6
? 8 7
? 10 9
? 8 10
? 11 7
? 10 9
? 7 10
? 7 11
? 12 9
? 7 12
? 7 11
? 13 9
? 7 13
? 7 11
? 14 9
? 7 14
? 7 11
? 15 9
? 7 15
? 7 11
? 16 9
? 7 16
? 7 11
? 17 9
? 7 17
? 18 11
? 17 9
? 18 17
? ...

result:

ok 1 cases

Test #70:

score: 0
Accepted
time: 0ms
memory: 3700kb

input:

1
88
>
>
<
>
<
>
<
<
>
<
<
>
<
>
<
<
<
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<...

output:

? 1 2
? 3 4
? 2 4
? 5 1
? 4 3
? 1 4
? 1 5
? 6 3
? 1 6
? 1 5
? 7 3
? 1 7
? 1 5
? 8 3
? 1 3
? 9 5
? 3 8
? 9 3
? 10 5
? 3 8
? 10 3
? 10 5
? 11 8
? 10 11
? 12 5
? 11 8
? 12 11
? 13 5
? 11 8
? 13 11
? 14 5
? 11 8
? 14 11
? 15 5
? 11 8
? 15 11
? 16 5
? 11 8
? 16 11
? 17 5
? 11 8
? 17 11
? 18 5
? 11 8
? 18...

result:

ok 1 cases

Test #71:

score: 0
Accepted
time: 0ms
memory: 3704kb

input:

1
89
<
<
>
<
>
<
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>...

output:

? 1 2
? 3 4
? 1 3
? 1 2
? 5 4
? 1 4
? 6 2
? 4 5
? 6 4
? 6 2
? 7 5
? 6 7
? 6 2
? 8 5
? 6 8
? 6 2
? 9 5
? 6 9
? 10 2
? 9 5
? 10 9
? 11 2
? 9 5
? 11 9
? 12 2
? 9 5
? 12 9
? 13 2
? 9 5
? 13 9
? 14 2
? 9 5
? 14 9
? 15 2
? 9 5
? 15 9
? 15 2
? 16 5
? 15 16
? 15 2
? 17 5
? 15 17
? 15 2
? 18 5
? 15 18
? 15 2...

result:

ok 1 cases

Test #72:

score: 0
Accepted
time: 6ms
memory: 3548kb

input:

1
90
<
>
<
>
<
>
<
>
<
>
<
<
<
<
<
<
<
<
>
<
<
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<...

output:

? 1 2
? 3 4
? 1 4
? 5 2
? 4 3
? 2 4
? 2 5
? 6 3
? 2 3
? 7 5
? 3 6
? 5 3
? 8 7
? 3 6
? 8 3
? 9 7
? 3 6
? 9 3
? 10 7
? 3 6
? 7 3
? 11 10
? 3 6
? 11 3
? 12 10
? 3 6
? 10 3
? 13 12
? 3 6
? 13 3
? 14 12
? 3 6
? 14 3
? 15 12
? 3 6
? 15 3
? 16 12
? 3 6
? 16 3
? 17 12
? 3 6
? 17 3
? 18 12
? 3 6
? 18 3
? 19 ...

result:

ok 1 cases

Test #73:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

1
91
<
>
>
<
>
>
<
<
>
<
>
<
<
<
<
<
<
>
<
<
>
<
<
>
<
>
<
<
<
<
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<...

output:

? 1 2
? 3 4
? 1 4
? 1 2
? 5 3
? 1 3
? 1 2
? 6 5
? 1 6
? 1 2
? 7 5
? 1 5
? 8 2
? 5 7
? 8 5
? 9 2
? 5 7
? 9 5
? 9 2
? 10 7
? 9 10
? 9 2
? 11 7
? 9 11
? 9 2
? 12 7
? 9 7
? 13 2
? 7 12
? 13 7
? 14 2
? 7 12
? 14 7
? 15 2
? 7 12
? 2 7
? 16 15
? 7 12
? 16 7
? 17 15
? 7 12
? 17 7
? 18 15
? 7 12
? 18 7
? 19 ...

result:

ok 1 cases

Test #74:

score: 0
Accepted
time: 3ms
memory: 3592kb

input:

1
92
<
<
>
<
<
<
<
<
<
>
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
>
<
<
>
<
<
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
<
<
<
<
>
<
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<...

output:

? 1 2
? 3 4
? 1 3
? 1 2
? 5 4
? 1 5
? 6 2
? 5 4
? 6 5
? 7 2
? 5 4
? 2 5
? 8 7
? 5 4
? 8 5
? 9 7
? 5 4
? 7 5
? 7 9
? 10 4
? 7 10
? 7 9
? 11 4
? 7 11
? 7 9
? 12 4
? 7 12
? 7 9
? 13 4
? 7 13
? 7 9
? 14 4
? 7 14
? 7 9
? 15 4
? 7 15
? 7 9
? 16 4
? 7 4
? 7 9
? 17 16
? 7 16
? 7 9
? 18 17
? 7 18
? 7 9
? 19 ...

result:

ok 1 cases

Test #75:

score: 0
Accepted
time: 9ms
memory: 3640kb

input:

1
93
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>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 4
? 12 6
? 13 8
? 6 4
? 13 6
? 14 8
? 6 4
? 14 6
? 15 8
? 6 4
? 15 6
? 16 8
? 6 4
? 16 6
? 17 8
? 6 4
? 8 6
? 18 17
? 6 4
? 18 6
? 19 17
? 6 ...

result:

ok 1 cases

Test #77:

score: 0
Accepted
time: 0ms
memory: 3640kb

input:

1
95
<
<
>
<
>
>
<
<
<
<
<
<
>
<
>
<
>
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
<
>
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<...

output:

? 1 2
? 3 4
? 1 3
? 1 2
? 5 4
? 1 4
? 1 2
? 6 5
? 1 6
? 7 2
? 6 5
? 7 6
? 8 2
? 6 5
? 2 6
? 2 8
? 9 5
? 2 5
? 10 8
? 5 9
? 10 5
? 11 8
? 5 9
? 8 5
? 8 11
? 12 9
? 8 12
? 8 11
? 13 9
? 8 13
? 8 11
? 14 9
? 8 14
? 8 11
? 15 9
? 8 15
? 8 11
? 16 9
? 8 16
? 8 11
? 17 9
? 8 17
? 8 11
? 18 9
? 8 18
? 8 11...

result:

ok 1 cases

Test #78:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

1
96
>
>
<
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<...

output:

? 1 2
? 3 4
? 2 4
? 5 1
? 4 3
? 5 4
? 5 1
? 6 3
? 5 6
? 5 1
? 7 3
? 5 7
? 5 1
? 8 3
? 5 8
? 9 1
? 8 3
? 9 8
? 10 1
? 8 3
? 10 8
? 11 1
? 8 3
? 11 8
? 12 1
? 8 3
? 12 8
? 13 1
? 8 3
? 13 8
? 14 1
? 8 3
? 14 8
? 15 1
? 8 3
? 15 8
? 16 1
? 8 3
? 16 8
? 17 1
? 8 3
? 17 8
? 18 1
? 8 3
? 18 8
? 19 1
? 8 3...

result:

ok 1 cases

Test #79:

score: 0
Accepted
time: 0ms
memory: 3876kb

input:

1
97
<
<
<
>
<
<
>
<
>
<
<
<
<
<
<
<
<
>
<
<
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
>
<
<
>
<
<
>
<
<
>
<
<
<
>
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
<...

output:

? 1 2
? 3 4
? 1 3
? 5 2
? 3 4
? 2 3
? 6 5
? 3 4
? 5 3
? 5 6
? 7 4
? 5 7
? 8 6
? 7 4
? 8 7
? 9 6
? 7 4
? 9 7
? 9 6
? 10 4
? 9 10
? 9 6
? 11 4
? 9 4
? 9 6
? 12 11
? 9 12
? 9 6
? 13 11
? 9 13
? 9 6
? 14 11
? 9 14
? 9 6
? 15 11
? 9 15
? 9 6
? 16 11
? 9 11
? 9 6
? 17 16
? 9 17
? 9 6
? 18 16
? 9 18
? 9 6
...

result:

ok 1 cases

Test #80:

score: 0
Accepted
time: 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1 2
? 8 7
? 1 8
? 1 2
? 9 7
? 1 7
? 10 2
? 7 9
? 10 7
? 11 2
? 7 9
? 2 7
? 2 11
? 12 9
? 2 12
? 2 11
? 13 9
? 2 13
? 14 11
? 13 9
? 14 13
? 15 11
? 13 9
? 15 13
? 16 11
? 13 9
? 16 13
? 17 11
? 13 9
? 17 13
? 18 11
? 13 9
? 18...

result:

ok 1 cases

Test #82:

score: 0
Accepted
time: 0ms
memory: 3672kb

input:

1
100
>
<
<
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
>
<
<
<
<
<
<
>
<
>
<
<
>
<
<
>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
...

output:

? 1 2
? 3 4
? 2 3
? 5 1
? 3 4
? 5 3
? 5 1
? 6 4
? 5 6
? 5 1
? 7 4
? 5 7
? 5 1
? 8 4
? 5 8
? 9 1
? 8 4
? 9 8
? 10 1
? 8 4
? 10 8
? 11 1
? 8 4
? 11 8
? 12 1
? 8 4
? 12 8
? 13 1
? 8 4
? 13 8
? 14 1
? 8 4
? 14 8
? 14 1
? 15 4
? 14 15
? 14 1
? 16 4
? 14 16
? 14 1
? 17 4
? 14 17
? 14 1
? 18 4
? 14 18
? 14...

result:

ok 1 cases