1 #include <iostream>
2 #include <cstdio>
3 #include <cstdlib>
4 #include <cmath>
5 #include <cstring>
6 #include <cctype>
7
8 #include <vector>
9 #include <list>
10 #include <deque>
11 #include <string>
12 #include <algorithm>
13 #include <stack>
14 #include <queue>
15 #include <map>
16 #include <set>
17
18 using namespace std;
19
20 int tt=0;
21
22
23 int main()
24 {
25
26 char s[1000];
27
28 int i,j,k;
29
30
31 while(scanf("%s",s)!=EOF)
32 {
33
34 getchar();
35 int len=strlen(s);
36
37 tt=0;
38
39 if(len<3)
40 {cout<<"Wrong Answer"<<endl;tt=1;}
41 else if(strcmp(s,"zoj")==0)
42 {cout<<"Accepted"<<endl;tt=1;}
43 else
44 {
45
46
47 int lenl,lenr;
48
49 lenl=lenr=0;
50
51 i=0;
52 while((i<len)&&(s[i]=='o'))
53 {lenl++;i++;}
54
55 j=len-1;
56
57 while((j>=0)&&(s[j]=='o'))
58 {lenr++;j--;}
59
60 string ss="";
61
62
63 while(i<=j)
64 {
65 ss+=s[i];
66 i++;
67 }
68
69 if(lenl==lenr)
70 {
71
72
73
74
75
76 if(ss=="zoj")
77 {cout<<"Accepted"<<endl;tt=1;}
78 else
79 {
80
81 if((s[0]=='z')&&(s[len-1]=='j'))
82 {
83 int nn=0;
84 int tag=0;
85
86 for(i=1;i<(len-1);i++)
87 {
88 if(s[i]=='o')
89 nn++;
90 else
91 {
92 tag=1;
93 }
94
95 }
96
97
98
99 if((nn>1)&(!tag))
100 {cout<<"Accepted"<<endl;tt=1;}
101 }
102
103 }
104
105 }
106 else if(lenl*2==lenr)
107 {
108 if(ss=="zooj")
109 {cout<<"Accepted"<<endl;tt=1;}
110 }
111
112 }
113
114 if(!tt)
115 {cout<<"Wrong Answer"<<endl;}
116
117
118 }
119
120
121
122
123
124
125
126
127
128 return 0;
129 }