mathtest

Problem Description

Mr Panda has just finished conducting his Math H3 course on Mental Arithmetic and has set a test for his S students. Given a number N, he wants his students to mentally calculate the Nth prime and write the answer out in words. Who would ever think that a Math course would test spelling? Obviously many of the students have forgotten their primary school math and Mr Panda has become so angry that he does not want to continue marking the test papers. He has asked you, as his assistant, to help him create a program to mark the rest of the questions in the test.

For simplicity's sake, the answers will exclude all punctuation marks including commas and hyphens. All "and"s will also be omitted so 999,999 will be written as "Nine hundred ninety nine thousand nine hundred ninety nine". Only the first letter of every answer will be capitalized.

Input

The first line of input consists of 2 integers: N and S.

The following S lines contain student i's answer on the ith line.

Output

On the ith line, output "Correct!" or "Wrong!" denoting the mark for the ith student.

Limits

0 < S ≤ 10 for all subtasks.

Subtask 1 (0%): Sample

Subtask 2 (50%): 0 < N ≤ 1000

Subtask 3 (50%): 0 < N ≤ 100000

Sample Input 1

3 3
Three
Five
Seven

Sample Output 1

Wrong!
Correct!
Wrong!


Submitting .cpp to 'mathtest'


You're not logged in! Click here to login

Time Limit: 1 Seconds
Memory Limit: 1024MB
Your best score: 0
Source: Dunjudge Archive

Subtask Score
1 50
2 50
3 0