WA in DCODIP

Solution for this Question in c++, and can also point mistakes in my code.
Question:https://www.codechef.com/problems/DCODIP
My code:
#include<bits/stdc++.h>

using namespace std;

int main()

{

set<char>s;

for(int i=0;i<35;i++)

{   char temp;

    cin>>temp;

    if(temp != '.')

    s.insert(temp);

}

//  bitset<4> bset1;

//  int j=0;

auto i= (s.begin());

cout<<bitset<8>(*i+63);

i++;

for(;i!=s.end();++i)

{

    // cout<<*i<<endl;itoa(number,binary_string,2);

    int a=(*i+63);

    cout<<"."<<bitset<8>(a);

}



 return 0;

}