mirror of
https://github.com/tiennm99/codeforces.git
synced 2026-06-09 14:11:38 +00:00
36 lines
819 B
C#
36 lines
819 B
C#
using System;
|
|
|
|
namespace _61B
|
|
{
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
string[] c = new string[3];
|
|
for (int i = 0; i < 3; i++)
|
|
{
|
|
c[i] = Console.ReadLine().Replace("-", "").Replace(";", "").Replace("_", "").ToLower();
|
|
}
|
|
string s1 = c[0] + c[1] + c[2];
|
|
string s2 = c[0] + c[2] + c[1];
|
|
string s3 = c[1] + c[2] + c[0];
|
|
string s4 = c[1] + c[0] + c[2];
|
|
string s5 = c[2] + c[0] + c[1];
|
|
string s6 = c[2] + c[1] + c[0];
|
|
int n = int.Parse(Console.ReadLine());
|
|
for (int i = 0; i < n; i++)
|
|
{
|
|
string s = Console.ReadLine().Replace("-", "").Replace(";", "").Replace("_", "").ToLower();
|
|
if (s == s1 || s == s2 || s == s3 || s == s4 || s == s5 || s == s6)
|
|
{
|
|
Console.WriteLine("ACC");
|
|
}
|
|
else
|
|
{
|
|
Console.WriteLine("WA");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|