#include #include using namespace std; int main(){ int a[100],b[100];int n,i; while(1){ scanf ("%i",&n); if (!n) return 0; for (i=0;i