#include #include using namespace std; int main() { char n[6]; char c1, c2; int i; bool run = true; while(run) { cin >> n >> c1 >> c2; if(!strcmp(n, "0") && c1 == '0' && c2 == '0') { return 0; } else { for(i=0; i