#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--) { int num = (int)str[j] - '0'; if (num == 9) { str[j] = '0'; up = true; str = j == 0 ? '1' + str : str; continue; } if (0<= num && num < 9) { str[j] = (char)num + '0' + 1; break; } else if (up) { str.insert(str.begin() + j + 1, '1'); break; } } strs[i] = str; } for (int i=0; i