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