#K39117. Determine Segment Type

    ID: 26350 Type: Default 1000ms 256MiB

Determine Segment Type

Determine Segment Type

Given an integer S, determine its corresponding segment type based on its remainder when divided by 4. The rules are as follows:

  • When \(S \bmod 4 = 0\), output WA.
  • When \(S \bmod 4 = 1\), output AM.
  • When \(S \bmod 4 = 2\), output MW.
  • When \(S \bmod 4 = 3\), output Peace.

You are given T test cases. For each test case, a single integer S is provided. Your program must output the corresponding segment type for each test case on a new line.

inputFormat

The first line of the input contains an integer T denoting the number of test cases. Each of the following T lines contains a single integer S representing the segment number.

outputFormat

For each test case, print the corresponding segment type in a new line.

## sample
4
1
4
7
10
AM

WA Peace MW

</p>