Under construction

Still being built. Things may change

SUAPC 2024 Winter

Time limit1sMemory limit1024 MB

Summary
Given N, print how many problems the team ranked Nth on the SUAPC 2024 Winter scoreboard solved, followed by their problem letters in lexicographic order.
Level

Easy2 of 10

Topics
Implementation
Solved
No attempts yet

Problem

[Figure] SUAPC 2024 Winter scoreboard

SUAPC is a programming contest for undergraduate students and first-year graduate students at five universities in the Sinchon area: Sogang, Sookmyung, Yonsei, Ewha, and Hongik. The contest problems follow the problem-setting style of the Seoul Regional. Teams are ranked by how many problems they solve correctly within the time limit. The image above is the scoreboard of SUAPC 2024 Winter.

A team that solves more problems ranks higher. If several teams solve the same number of problems, the team with the smaller total penalty ranks higher. The rightmost number on the scoreboard is the total penalty of the problems each team solved.

The penalty for one problem is (time of the first correct submission) ++ (number of wrong submissions before the first correct submission) ×\times 2020.

Given a positive integer NN, find the number of problems solved and the problem numbers solved by the team ranked NNth in SUAPC 2024 Winter.

Input

The first line contains a positive integer NN. (1≤N≤101 \le N \le 10)

Output

The first line prints the number of problems solved by the team ranked NNth in SUAPC 2024 Winter.

The second line prints the problem numbers solved by that team in lexicographic order, separated by spaces. Print the problem letters in uppercase.

Examples2

  1. Example 1

    Input
    1
    
    Expected output
    11
    A B C D E F G H J L M
    
  2. Example 2

    Input
    2
    
    Expected output
    9
    A C E F G H I L M