public static void main(String[] args) {

  }

  static {
      //add your code here - добавьте код тут

      Flyable result = reset();


  }

  public static Flyable result;

  public static void reset() {
      //add your code here - добавьте код тут
      BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

      try {
          String s = reader.readLine();
          if (s.equals("helicopter")){
          result =  new Helicopter();
          }
          else if (s.equals("plane")){
              int num = Integer.parseInt(reader.readLine());
           result = new Plane(num);
          }

          reader.close();
      } catch (IOException e) {
          e.printStackTrace();
      }

  }