1 #include <iostream>
2 #include<string>
3 using namespace std;
4 int p,q,a[100],b[100],c[100];
5 int main()
6 {
7 cin>>p>>q;
8 int cnt1=0,cnt2=0;
9 while(p!=0)
10 {
11 a[cnt1++]=p%2;
12 p/=2;
13 }
14 while(q!=0)
15 {
16 b[cnt2++]=q%2;
17 q/=2;
18 }
19 int cnt=0,ans[100];
20 for(int i=0;i<8;i++)
21 {
22 c[i]=a[i]&b[i];
23 if(c[i]==1){
24 ans[cnt++]=i+1;
25 }
26 }
27 if(cnt<2)
28 {
29 cout<<"0"<<endl;
30 cout<<"Close"<<endl;
31 }
32 else
33 {
34 for(int i=0;i<cnt;i++)
35 {
36 if(i) cout<<" ";
37 cout<<ans[i];
38 }
39 cout<<endl;
40 cout<<"Open"<<endl;
41 }
42 // cout << "Hello world!" << endl;
43 return 0;
44