시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 60 13 11 21.569%

문제

사성 전자는 매우 빠른 특수 목적용 맞춤형 프로세서를 만든다. 프로세서는 a-C-M(예를 들면, 1-C-2, 5-C-3)와 같은 이름이 붙어있고, 아래 2가지 연산만 사용할 수 있다.

  • A: a를 더한다.
  • M: m을 곱한다.

프로세서는 정수를와 A와 M으로만 되어있는 프로그램을 입력으로 받은 뒤, 프로그램에 따라 입력받은 정수를 변경하고, 결과를 출력한다. 예를 들어, 1-C-2 프로세서에 2를 입력으로 넣고, AAAM 프로그램을 실행시킨다면, 출력은 10이 된다. (2->3->4->5->10) 같은 입력을 5-C-3프로세서에 넣는다면 51을 출력한다. (2->7->12->17->51)

재헌이는 회사에서 비밀 프로젝트를 담당하는 a-C-m 프로그래머이다. 즉, 비밀 프로젝트이기 때문에, 재헌이도 자신이 정확히 무슨 프로그램을 만들어야 하는지를 모른다. 하지만, 회사의 사장은 재헌이에게 p, q, r, s가 주어졌을 때, 다음과 같은 조건을 만족시키는 프로그램을 만드는 것이라고 했다.

  1. 입력은 p와 q 사이의 숫자이다. (p, q 포함)
  2. 출력은 항상 r과 s사이이어야 한다. (r, s 포함)

a-C-M 프로세서와 p, q, r, s가 주어졌을 때, p≤x≤q를 만족하는 모든 x에 대해서, r≤y≤s를 만족하는 y를 출력하는 가장 길이가 짧은 프로그램을 작성하시오. 이 때, 조건을 지키는 프로그램이 여러개일 경우, 사전순으로 앞서는 것을 출력한다. (프로그램을 A와 M으로 이루어진 문자열로 생각하고 사전순 비교하면 된다)

입력

입력은 여러개의 테스트 케이스로 이루어져 있다. 각 테스트 케이스는 6개의 정수 a, m, p, q, r, s로 이루어져 있다. (1 ≤ a,m,p,q,r,s ≤ 109, p ≤ q, r ≤ s)

마지막 테스트 케이스의 다음 줄에는 0 여섯개가 주어진다.

출력

각 테스트 케이스에 대해서, 케이스 번호를 출력하고, 문제 설명에 해당하는 프로그램을 출력한다. 만약, 연산을 수행하지 않아도 될 때는 "empty"를 출력하고, 그러한 프로그램을 만드는 것이 불가능할 때에는 "impossible"을 출력한다.

프로그램을 공백으로 구분된 문자열을 출력하면 되고, "nA" 형식과 "nM"형식을 서로 번갈아가면서 출력하면 된다. (n > 0) n은 연속된 A 연산의 개수, 또는 M 연산의 개수이다.

예제 출력의 형식을 참고한다.

예제 입력 1

1 2 2 3 10 20
1 3 2 3 22 33
3 2 2 3 4 5
5 3 2 3 2 3
0 0 0 0 0 0

예제 출력 1

Case 1: 1A 2M
Case 2: 1M 2A 1M
Case 3: impossible
Case 4: empty
W3sicHJvYmxlbV9pZCI6IjQyMTUiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWJlNDRcdWJjMDAgXHVkNTA0XHViODVjXHVjODFkXHVkMmI4IiwiZGVzY3JpcHRpb24iOiI8cD5cdWMwYWNcdWMxMzEgXHVjODA0XHVjNzkwXHViMjk0IFx1YjllNFx1YzZiMCBcdWJlNjBcdWI5NzggXHVkMmI5XHVjMjE4IFx1YmFhOVx1YzgwMVx1YzZhOSBcdWI5ZGVcdWNkYTRcdWQ2MTUgXHVkNTA0XHViODVjXHVjMTM4XHVjMTFjXHViOTdjIFx1YjljY1x1YjRlMFx1YjJlNC4gXHVkNTA0XHViODVjXHVjMTM4XHVjMTFjXHViMjk0IGEtQy1NKFx1YzYwOFx1Yjk3YyBcdWI0ZTRcdWJhNzQsIDEtQy0yLCA1LUMtMylcdWM2NDAgXHVhYzE5XHVjNzQwIFx1Yzc3NFx1Yjk4NFx1Yzc3NCBcdWJkOTlcdWM1YjRcdWM3ODhcdWFjZTAsIFx1YzU0NFx1Yjc5OCAyXHVhYzAwXHVjOWMwIFx1YzVmMFx1YzBiMFx1YjljYyBcdWMwYWNcdWM2YTlcdWQ1NjAgXHVjMjE4IFx1Yzc4OFx1YjJlNC48XC9wPlxyXG5cclxuPHVsPlxyXG5cdDxsaT5BOiBhXHViOTdjIFx1YjM1NFx1ZDU1Y1x1YjJlNC48X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