#include using namespace std; int main(void) { int T; int level; cin >> T; string strs[T]; cin.ignore(); for (int i=0; i=0; j--) { num = (int)str[j] - '0'; if (num == 9) { str[j] = '0'; up = true; continue; } if (0<= num && num < 9) { str[j] = (char)num + '0' + 1; break; } if (up) { str.insert(str.begin() + j+1, '1'); up = false; break; } } str = up ? '1' + str : str; strs[i] = str; } for (int i=0; i