#include<iostream>
#include<algorithm>
#include<string.h>
using namespace std;
int main(){
	freopen("query.in","r",stdin);
	freopen("query.out","w",stdout);
	cout<<3<<endl<<4<<endl<<3<<endl;
	return 0;
} 
