//file headers start
#include<bits/stdc++.h>
using namespace std;
#define rep(i, _st, _ed) for(register int i = (_st); i <= (_ed); ++i)
void fileop(const char *s){
char s2[15], s3[15]; //memset(s2, 0, sizeof s2);
strcpy(s2, s), strcpy(s3, s);
freopen(strcat(s2, ".in"), "r", stdin);
freopen(strcat(s3, ".out"), "w", stdout);
}
int read(){
int f = 1, ans = 0; char c = getchar();
while(!isdigit(c)) {
if(c == ‘-‘) f = -1;
c = getchar();
}
while(isdigit(c)) {
ans = ans * 10 + c - ‘0‘;
c = getchar();
}
return ans * f;
}
void put(int num) { printf("%d\n", num); }
void testread() { while(1) { int k = read(); put(k); if(!k) break;}}
//file headers end原文:https://www.cnblogs.com/Eroad/p/9773697.html