아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Palindromic Poster

시간 제한1초메모리 제한1024 MB

요약
정확히 R개의 행과 C개의 열이 회문이 되도록 N×M 문자 격자를 만들거나, 불가능하다고 판정한다.
난이도

보통10점 중 5점

유형
구현, 그리디, 문자열
정답자
아직 제출이 없습니다

문제

Ryo and Kita are designing a new poster for Kessoku Band. After some furious brainstorming, they came to the conclusion that the poster should come in the form of a 2-D grid of lowercase English letters (i.e. a to z), with NN rows and MM columns.

Furthermore, it is known that Ryo and Kita both have peculiar tastes in palindromes. Ryo will only be satisfied with the poster if exactly RR of its rows are palindromes, and Kita will only be satisfied with the poster if exactly CC of its columns are palindromes. Can you design a poster that will satisfy both Ryo and Kita, or determine that it is impossible to do so?

Note: A string is considered a palindrome if it is the same when read forwards and backwards. For example, kayak and bb are palindromes, whereas guitar and live are not.

입력

The first and only line of input consists of 44 space-separated integers NN, MM, RR, and CC.

출력

If it is impossible to design a poster that will satisfy both Ryo and Kita, output IMPOSSIBLE on a single line.

Otherwise, your output should contain NN lines, each consisting of MM lowercase English letters, representing your poster design. If there are multiple possible designs, output any of them.

제한

  • 2≤N≤2,0002 \le N \le 2\\,000
  • 2≤M≤2,0002 \le M \le 2\\,000
  • 0≤R≤N0 \le R \le N
  • 0≤C≤M0 \le C \le M

예제2

  1. 예제 1

    입력
    4 5 1 2
    
    예상 출력
    union
    radar
    badge
    anime
    
  2. 예제 2

    입력
    2 2 2 1
    
    예상 출력
    IMPOSSIBLE