text: //Copyright (c) LUMOGROUP@github.com
  #include <iostream>
  int main(void){
      int s[11], c;
      bool l = true;
      for(int i = 0; i < 9; i++)
          std::cin >> s[i];
      std::cin >> c;
      for(int i = 0; i < 9; i++){
          if(c <= s[i] && l)
              {std::cout << c << std::endl;
               l = false;}
          std::cout << s[i] << std::endl;
      }
      return 0;
  }