#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define mmp make_pair
#define st first
#define nd second
#define rd third
#define ll long long
#define pii pair <int, int>
#define tri pair <pii, int>
#define itr pair <int, pii>
#define pq priority_queue
#define all(v) (v).begin(), (v).end()
#define REP(i, n) for (int (i) = 0; (i) < (int)(n); i++)
#define FOR(i, a, n) for (int (i) = (a); (i) < (int)(n); i++)
#define FORN(i, a, n) for (int (i) = (a); (i) > (int)(n); i--)
#define Rep(i, n) for (int (i) = 0; (i) <= (int)(n); i++)
#define For(i, a, n) for (int (i) = (a); (i) <= (int)(n); i++)
#define Forn(i, a, n) for (int (i) = (a); (i) >= (int)(n); i--)
#define rep(i, n) for (int (i) = 1; (i) <= (int)(n); i++)
#define pi 3.1415926535897932384626433832795028841971
//#define LOCAL

const int INF = 1e9;
const int Maxn = 1005;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};

struct pos { int first, second, third; };

string s;
string ans;

int main()
{
	#ifdef LOCAL
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	#endif

	cin >> s;
	ans += s[0];
	bool at = true;
	FOR(i, 1, s.size())
	{
		string t1, t2;
		if (i != s.size() - 1) FOR(j, i, 2 + i) t1 += s[j];
		if (i != s.size() - 2) FOR(j, i, 3 + i) t2 += s[j];
		if (t1 == "at" && at) ans += '@', i++, at = false;
		else if (t2 == "dot") ans += '.', i += 2;
		else ans += s[i];
	}

	if (ans[ans.size() - 1] == '@') ans = ans.substr(0, ans.size() - 1) + "at";
	if (ans[ans.size() - 1] == '.') ans = ans.substr(0, ans.size() - 1) + "dot";

	puts(ans.c_str());

	return 0;
}

#include <iostream>
#include <string>
#include <stdio.h>
#include <set>
#include <cstring>
using namespace std;
char s[105],w[105];
bool f;
int k;
int main()
{
    f=1;
    scanf("%s",s);
    int l=strlen(s);
    for(int i=0;i<l;i++)
    {
            if(s[i]=='d' && s[i+1]=='o' && s[i+2]=='t' && i!=0 && i<l-3)
            {
                         w[k++]='.';i+=2;

            }
            else if(s[i]=='a' && s[i+1]=='t' && f==1 && i<l-1 && i!=0)
            {
                         w[k++]='@';
                         i+=1;
                         f=0;
            }
            else
            w[k++]=s[i];
    }
    printf("%s",w);
    printf("\n");
    return 0;
}

#include <iostream>
#include <stdio.h>
#include <string>
#include <cstring>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <iomanip>
using namespace std;
#define assem99 ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long
#define ull unsigned long long
#define ld long double
#define ii pair<int, int>
#define vii vector<ii>
#define f(i,a,b) for(int i=a; i<b; i++)
#define F first
#define S second
#define sz(a) (int)(a).size()
#define ReadFile freopen("input.txt","r",stdin)
#define WriteFile freopen("output.txt","w",stdout)
int x[] = { 0, -1, 0, 1, -1, 1, -1, 1 };
int y[] = { -1, 0, 1, 0, 1, -1, -1, 1 };
const int MOD = 1e9 + 7, N = 2e5 + 5;
const double pi = acos(-1);

vector<int> vec;

int main()
{
	assem99;

	string s; cin >> s;
	bool at = false, empt = true;
	f(i, 0, sz(s))
	{
		if (s.substr(i, 2) == "at" && !at && !empt && i != sz(s) - 2)
		{
			at = true;
			cout << "@";
			i++;
		}
		else if (s.substr(i, 3) == "dot" && !empt && i != sz(s) - 3)
		{
			cout << '.';
			i += 2;
		}
		else
		{
			cout << s[i];
			empt = false;
		}
	}

	return 0;
}

//@ravirocx
//please dont copy...you will regret
//my codes always produce wrong answers

#include<bits/stdc++.h>
using namespace std;

int main()
{
char A[1000];
int i,k=0;

cin>>A;
int t=strlen(A);
cout<<A[0];
for(i=1;i<t-3;i++)
{

	if(A[i]=='a'&&A[i+1]=='t'&&k==0)
	{
		cout<<"@";i=i+1;k=1;
	}
	else if(A[i]=='d'&&A[i+1]=='o'&&A[i+2]=='t')
	{
		cout<<".";i=i+2;
	}

	else
	cout<<A[i];
}
for(i;i<t-1;i++)
{
	if(A[i]=='a'&&A[i+1]=='t'&&k==0)
	{
		cout<<"@";i=i+1;k=1;
	}
	else
	cout<<A[i];
}
cout<<A[t-1];
}

#include <cstdio>
#include <cstring>
using namespace std;
char ead[110];
int main()
{
    int i = 0, len, flag = 0;
    gets(ead);
    len = strlen(ead);
    while(i < len)
    {
        if(ead[i] == 'a')
        {
            if(ead[i + 1] == 't' && i + 1 != len - 1 && i != 0 && !flag)
            {
                printf("@");
                flag = 1;
                i += 2;
            }
            else
            {
                printf("%c", ead[i]);
                i++;
            }
        }
        else if(ead[i] == 'd')
        {
            if(ead[i + 1] == 'o' && ead[i + 2] == 't' && i != 0 && i + 2 != len - 1)
            {
                printf(".");
                i += 3;
            }
            else
            {
                printf("%c", ead[i]);
                i++;
            }
        }
        else
        {
             printf("%c", ead[i]);
             i++;
        }
    }
    printf("\n");
    return 0;
}

#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>

#define rep(i,n) for(__typeof(n) i=0; i<(n); i++)
#define rep1(i,n) for(__typeof(n) i=1; i<=(n); i++)
#define rep2(i,a,b) for(__typeof(b) i=(a); i<=(b); i++)
#define inf 1061109567000LL
#define pi 3.14159265358979323846264338327950

#define pb(x) push_back(x)
#define all(x) x.begin(),x.end()

#define sz size()
#define eps 1e-9
#define vi vector<int>
#define vs vector<string>
#define mii map<int,int>
#define msi map<string,int>
#define mis map<int,string>
#define CLEAR(x) memset(x,0,sizeof(x));
#define max(a,b) (a>b?a:b)
#define min(a,b) (a<b?a:b)
#define mem(x,y) memset(x,y,sizeof(x));
#define N      10000000;
#define ll long long
#define case(n)   cout<<"Case "<<ca++<<": "<<n<<endl;
#define case1(n)  cout<<"Case "<<ca++<<"#: "<<n<<endl;
#define READ freopen("input.txt","r",stdin)
#define WRITE freopen("output.txt","w",stdout)
///usage.push_back(make_pair(x*a+y*b,i+1));
using namespace std;
int main()
{
    string s;
    while(cin>>s)
    {
    cout<<s[0];
    int i,ans=0;
    for(i=1;i<s.sz;i++)
    {
        if(ans==0 and s[i]=='a' and s[i+1]=='t' and i<s.sz-1)
        {
            cout<<"@";
            ans=1;
            i++;
           continue;
        }
        if(s[i]=='d' and s[i+1]=='o' and s[i+2]=='t' and i<s.sz-3)
        {
            cout<<".";
            i=i+2;
            continue;
        }
        cout<<s[i];
    }
    cout<<endl;
    }
    return 0;
}

#include <bits/stdc++.h>
#define ll/*////////*/long long                           ///////////////////////////////
#define gcd(a,b)/*////////*/__gcd(a,b)                    //Please get-off from my code//
#define pi/*////////*/3.1415926536                        ///////////////////////////////
using namespace std;
int lcm(int a,int b){return (a*b)/(gcd(a,b));}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	//------Enter your code here.------
	string a;cin>>a;int z=0;
	for(size_t i=0;i<a.size();i++)
	{
		if(a[i]=='a' and a[i+1]=='t' and i<a.size()-2 and i and !z)
		{
			a[i+1]='@';
			a.erase(a.begin()+i);
			z++;
		}
		else if(a.substr(i,3)=="dot" and i and i<a.size()-3)
		{
			a[i+2]='.';
			a.erase(a.begin()+i);
			a.erase(a.begin()+i);
		}
	}
	cout<<a<<"\n";
}

#include <iostream>

using namespace std;

int main() {
    string s;
    cin>>s;
    size_t p_dot=s.find("dot",1);
    if (p_dot!=string::npos&&p_dot!=s.size()-3)
        do {
            s.replace(p_dot,3,".");
            p_dot=s.find("dot",1);
        } while (p_dot!=string::npos&&p_dot!=s.size()-3);
    size_t p_at=s.find("at",1);
    if (p_at!=string::npos&&p_at!=s.size()-2)
        s.replace(p_at,2,"@");
    cout<<s<<endl;
    return 0;
}

#include <iostream>
#include <cstring>
using namespace std;
char email[105];
int main()
{
    cin>>email;
    int n=strlen(email);
    for(int i=1; i<n-3; ++i) {
        if(email[i]=='d' && email[i+1]=='o' && email[i+2]=='t') {
            email[i]='.';
            email[i+1]=0;
            email[i+2]=0;
        }
    }
    for(int i=1; i<n-2; ++i) {
        if(email[i]=='a' && email[i+1]=='t') {
            email[i]='@';
            email[i+1]=0;
            break;
        }
    }
    for(int i=0; i<n; ++i) if(email[i] != 0) cout<<email[i];
    return 0;
}

#include <iostream>

using namespace std;

string atChanger(string str){

    string substring="at";
   char a=str[0];
    str=str.substr(1);
    if (str.find(substring) != std::string::npos){
        int index = str.find(substring);
        str.replace(index,2,"@");
  }

  	return a+str;

}
string dotChanger(string str){
    string substring="dot";
    if (str.find(substring) != std::string::npos){
        int index = str.find(substring);
        str.replace(index,3,".");
  }
   else {
  	return str;
  }

    return dotChanger(str);
}

int main()
{
    string description;
    cin>>description;

    description=atChanger(description);
    description=dotChanger(description);

    if(description[0]=='.')
        description.replace(0,1,"dot");
    if(description[description.size()-1]=='.')
        description.replace(description.size()-1,1,"dot");

        cout<<description;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;

int main()
{
    int flag=0;
    string s;
    cin>>s;
    for(int i=0;i<s.length();++i)
    {
        if(i>0 && i<s.length()-3 && s.substr(i,3)=="dot")
        {

                cout<<".";
                i+=2;
                continue;
        }
        else if(i>0 && i<s.length()-2 && flag==0 && s.substr(i,2)=="at")
        {
                flag=1;
                cout<<"@";
                i++;
                continue;
        }
        else
            cout<<s[i];
    }
    return 0;
}

//#pragma comment(linker, "/STACK:64000000")
#define _CRT_SECURE_NO_DEPRECATE
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <cstdio>
#include <string>
#include <stack>
#include <deque>
#define sf scanf
#define pf printf
#define ve vector
#define pii pair<int,int>
#define mp make_pair
#define pb push_back
#define FOR(i,n) for(int i = 0; i < (n); i++)
#define FOR1(i,n) for(int i = 1; i <= (n); i++)
#define all(x) (x).begin(),(x).end()
#define sqr(x) (x)*(x)
using namespace std;
int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "rt", stdin);
    freopen("output.txt", "wt", stdout);
#endif
    char a[101] = {0};
    sf("%s",a);
    int n = strlen(a);
    for(int i = 1; i < n - 2; i++)
    {
        if(a[i] == 'a' && a[i+1] == 't')
        {
            a[i] = 0;
            a[i + 1] = '@';
            break;
        }
    }
    for(int i = 1; i < n - 3; i++)
    {
        if(a[i] == 'd' && a[i + 1] == 'o' && a[i + 2] == 't')
        {
            a[i] = a[i + 1] = 0;
            a[i + 2] = '.';
        }
    }

    for(int i = 0; i < n; i++)
    {
        if(a[i] != 0)
            pf("%c",a[i]);

    }
    return 0;
}

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<string>
#include<cmath>

using namespace std;
char s[105];
int len;

bool d=0;
int main()
{
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);

	gets(s);len=strlen(s);
	printf("%c",s[0]);
	for(int i=1;i<len-1;++i)
	{
		if((s[i]=='d'&&s[i+1]=='o'&&s[i+2]=='t')&&(i!=len-3))
		{
			printf(".");
			i+=2;continue;
		}
		if((s[i]=='a'&&s[i+1]=='t')&&!d&&(i!=len-2))
		{
			printf("@");i++;d=1;continue;
		}
		printf("%c",s[i]);
	}
	printf("%c",s[len-1]);
	//fclose(stdin);
	//fclose(stdout);
 	return 0;
}

#include <iostream>
#include <string>
#include <sstream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <cstdio>

using namespace std;

int main()
{
    //freopen("input.txt","r",stdin);
    string mail;
    //getline(cin,mail);
    cin>>mail;

    string S="";

    int atcount=0;

    mail+="#####";

    for( int i=0;i<mail.length()-5;++i )
    {
        if( S.length()!=0 && (i+3 != mail.length()-5) && mail[i]=='d' && mail[i+1]=='o' && mail[i+2]=='t' )
        {
            S+='.';
            i+=2;
            continue;
        }
        if( S.length()!=0 && atcount==0 && mail[i]=='a' && mail[i+1]=='t' )
        {
            S+='@';
            i+=1;
            atcount=1;
            continue;
        }
        S+=mail[i];
    }

    cout<<S<<endl;

    return 0;
}

#include <bits/stdc++.h>
using namespace std;

#define PI 3.141592653589
#define ll long long int
#define ld long double
#define vi vector<int>
#define vl vector<ll>
#define ii pair<int,int>
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define pll pair<ll,ll>
#define vv vector
#define all(v) (v).begin(),(v).end()
int MOD=1e9+7;
ll power(ll a, ll b){//a^b
    ll res=1;
    a=a%MOD;
    while(b>0){
        if(b&1){res=(res*a)%MOD;b--;}
        a=(a*a)%MOD;
        b>>=1;
    }
    return res;
}
ll fermat_inv(ll y){return power(y,MOD-2);}
ll gcd(ll a, ll b){return (b==0)?a:gcd(b,a%b);}
ll min(ll a,ll b){return (a>b)?b:a;}
ll max(ll a,ll b){return (a>b)?a:b;}
bool prime[1000001];
vi primes;
void SieveOfEratosthenes(int n)
{
    memset(prime, true, sizeof(prime));
    for (int p=2; p*p<=n; p++)
    {
        if (prime[p] == true)
        {
            for (int i=p*p; i<=n; i += p)
                prime[i] = false;
        }
    }
    for(int p=2;p<1000001;p++)
        if(prime[p])
            primes.pb(p);
}
ll fact[100005];
ll finv[100005];
void factorial(int n){
    fact[0]=1;
    finv[0]=1;
    for(int i=1;i<=n;i++)
        fact[i]=fact[i-1]*i,fact[i]%=MOD,finv[i]=fermat_inv(fact[i]);
}
ll ncr(ll n,ll r)
{
    if(n<r)
        return -1;
    else{
        ll x=finv[r]*finv[n-r]%MOD;
        return fact[n]*x%MOD;
    }
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    int t=1;
    //cin>>t;
    //SieveOfEratosthenes(1000000);
    //factorial(100005);
    while(t--){
        string s,r="";
        cin>>s;
        r+=s[0];
        for(int i=1;i<s.size();i++){
            if(i<s.size()-3&&s[i]=='d'&&s[i+1]=='o'&&s[i+2]=='t')
                r+='.',i+=2;
            else
                r+=s[i];
        }

        s=r,r=s[0];
        bool b=true;
        for(int i=1;i<s.size();i++){
            if(i<s.size()-2&&s[i]=='a'&&s[i+1]=='t'&&b)
                r+='@',i++,b=false;
            else
                r+=s[i];
        }
        cout<<r;
    }
}

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
	string s;
	int mark=0;
	cin>>s;
	int n=s.size();
	cout<<s[0];
	for(int i=0;i<n;i++)
	{
		if(i>0)
		{
			if(s[i]=='a' and i<n-2 and s[i+1]=='t' and !mark)
			{
				mark=1;
				cout<<'@';
				i++;
				continue;
			}
			else
			if(s[i]=='d' and i<n-3 and s[i+1]=='o' and s[i+2]=='t')
			{
				cout<<'.';
				i+=2;
				continue;
			}
			cout<<s[i];
		}
	}
	return 0;
}

#include <stdio.h>
#include <conio.h>
#include <math.h>
#include <string.h>
int main(void)
    {
    int i,j,k,t,l,s;
    char e[100];
    scanf("%s",&e);
    l=strlen(e);
    printf("%c",e[0]);
    s=0;
    for(i=1;i<l;i++)
                    {
                    if((e[i]=='a')&&(e[i+1]=='t')&&(s==0)) {printf("%c",'@');i++;s++;continue;}
                    if((e[i]=='d')&&(e[i+1]=='o')&&(e[i+2]=='t'))
                    {
                        if (i!=l-3) {printf("%c",'.');i+=2;continue;}
                        else
                        {
                            printf("dot");
                            return 0;
                        }
                    }
                    printf("%c",e[i]);
                    }
    //getch();
    return 0;
    }

#include <iostream>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <vector>
#include <map>
using namespace std;

int comp (const int *i, const int *j) {
    return *i - *j;
}

int upp (int a, int b) { return a < b;}

#define BUG(s, v) cout << s << ' ' << v << endl;
#define FOR(i, n) for (int i = 0; i < n; i++)

int main()
{
    string s;
    int l;
    cin >> s;
    string beg = "", end = "";
    string dot = "dot";
    string at = "at";
    int dotPos;
    int atPos;
    bool fl = true, f1 = true;
    while ((dotPos = s.find(dot)) != -1) {
        l = s.length();
        if (dotPos == 0 && fl) {
            s.erase(dotPos, 3);
            beg = "dot";
            fl = false;
        } else {
            if (dotPos == l - 3 && f1) {
                end = "dot";
                s.erase(dotPos, 3);
                f1 = false;
            } else {
                s.erase(dotPos, 3);
                s.insert(dotPos, ".");
            }
        }
    }

    vector<int> a;

    fl = true;
    f1 = true;
    int k = 1;
    while ((atPos = s.find(at)) != -1) {
        l = s.length();
        if (atPos == 0 && fl) {
            if (beg != "dot") {
                beg = "at";
                s.erase(atPos, 2);
            }
            fl = false;
        } else {
            if (atPos == l - 2 && f1) {
                if (end != "dot") {
                    end = "at";
                    s.erase(atPos, 2);
                }
                f1 = false;
            } else {
                if (k == 1){
                    s.erase(atPos, 2);
                    s.insert(atPos, "@");
                    k++;
                } else {
                    break;
                }
            }
        }
    }
    cout << beg << s << end;

    return 0;
}

#include<bits/stdc++.h>
using  namespace std;
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define sz(x) ((ll)(x).size())
#define init(x, a) memset(x, a, sizeof(x))
#define forr(i,a,b) for(ll i=(ll)a;i<(ll)b;i++)
#define rfor(i,a,b) for(ll i=(ll)a;i>=(ll)b;i--)
#define fastio ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
typedef  long long ll;
typedef long double ld;
typedef pair<ll,ll> pll;
typedef vector<ll> vll;
typedef set<ll> sll;
typedef unordered_set<ll> usll;
typedef map<ll,ll> mll;
typedef unordered_map<ll,ll> umll;
//const ll mod = 1e6+3;
//const ld PI=3.14159265;
ll gcd(ll a,ll b) { return a?gcd(b%a,a):b;}

int main()
{
    fastio;
    int r=0,k=0;
    string s,ans="";
    cin>>s;
    ans+=s[0];
    forr(i,1,sz(s))
    {
        r=0;
        if(s[i]=='d'&& i+3<sz(s))
        {
            if(s[i+1]=='o' && s[i+2]=='t'){ans+='.';i+=2;r=1;}
        }
        if(s[i]=='a' && i+1<sz(s) && k==0)
        {
            if(s[i+1]=='t'){ans+='@';i+=1;r=1;k=1;}
        }
        if(r==0)
        {
            ans+=s[i];
        }
    }
    cout<<ans;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define ull unsigned long long
#define ld long double
#define pii pair<int,int>
#define vi vector<int>
#define vs vector<string>
#define vpii vector<pair<int,int>>
#define si set<int>
#define usi unordered_set<int>
#define ss set<string>
#define spii set<pair<int,int>>
#define di deque<int>
#define li list<int>
#define sti stack<int>
#define qi queue<int>
#define pq priority_queue<int>
#define mii map<int,int>
#define mll map<ll,ll>
#define umii unordered_map<int,int>
#define vit vector<int>::iterator
#define mit map<int,int>::iterator
#define sit set<int>:: iterator

#define fr(i,a,b) for(int i=a;i<b;i++)
#define rfr(i,a,b) for(int i=b-1;i>=a;i--)
#define eqfr(i,a,b) for(int i=a;i<=b;i++)
#define reqfr(i,a,b) for(int i=b;i>=a;i--)
#define printa(a,L,R) fr(i,L,R)cout<<a[i]<<(i==R-1?'\n':' ')
#define printv(a) printa(a,0,a.size())
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define fill(a,x) memset(a,x,sizeof(a))
#define fill2d(a,x,n,m) memset(a,x,n*m*sizeof(a[0][0]))
#define inf 0x3f3f3f3f
#define mod 1e9+7
#define nl "\n"

#define rev(v) reverse(v.begin(),v.end())
#define srt(v) sort(v.begin(),v.end())
#define grtsrt(v) sort(v.begin(),v.end(),greater<int>())
#define mnv(v) *min_element(v.begin(),v.end())
#define mxv(v) *max_element(v.begin(),v.end())
#define countv(v,a) cout(v.begin(),v.end(),a)

#define fast ios_base::sync_with_stdio(false)
int res[100100];
int main()
{
    fast;
    int n,i,j,cnt=0;
    string s;
    cin>>s;
    for(i=1;i<s.length()-3;i++){
        if(s[i]=='d'&&s[i+1]=='o'&&s[i+2]=='t'){
            s[i]='.';
            s.erase(i+1,2);
            cnt++;
        }
    }
    if(cnt==0){
        for(i=1;i<s.length()-2;i++){
            if(s[i]=='a'&&s[i+1]=='t'){
                s[i]='@';
                s.erase(s.begin()+i+1);
                break;
            }
        }
    }
    else{
        for(i=1;i<s.length()-2;i++){
            if(s[i]=='a'&&s[i+1]=='t'){
                s[i]='@';
                s.erase(s.begin()+i+1);
                break;
            }
        }
    }
    cout<<s<<endl;
    return 0;
}

#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;

char s[110];
char ans[110];

int main(){
    scanf("%s",s);
    int l = strlen(s);
    int id = 0;
    int flag = 1;
    ans[id++] = s[0];
    for(int i=1;i<l;i++){
        if(s[i] == 'd'){
            if(i+2 < l-1 && s[i+1] == 'o' && s[i+2] == 't'){
                ans[id++] = '.';
                i = i + 2;
            }
            else ans[id++] = s[i];
        }
        else if(s[i] == 'a'){
            if(i+1 < l-1 && s[i+1] == 't' && flag == 1){
                ans[id++] = '@';
                flag = 0;
                i = i+1;
            }
            else ans[id++] = s[i];
        }
        else ans[id++] = s[i];
    }
    ans[id] = 0;
    printf("%s\n",ans);
    return 0;
}
/*2017-08-06 19:22:05.6*/

#include <iostream>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <stdio.h>
#include <vector>
#include <queue>
#include <set>
#include <stack>
using namespace std;

int main()
{
	int n,l,i,sign;
    char s[1000];
    cin>>s;
    l=strlen(s);
    cout<<s[0];
    sign=0;
    for(i=1;i<l;i++)
    {
        if(i!=l-3&&s[i]=='d'&&s[i+1]=='o'&&s[i+2]=='t')
        {
            cout<<".";
            i+=2;
        }
        else if(i!=l-2&&s[i]=='a'&&s[i+1]=='t'&&sign==0)
        {
            cout<<"@";
            i+=1;
            sign=1;
        }
        else cout<<s[i];
    }
	return 0;
}

#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <map>
#include <iostream>
#include <fstream>
#include <math.h>
#include <stdlib.h>

typedef unsigned int        u32;
typedef int                 s32;
typedef float               fp32;
typedef double              fp64;
typedef __int64             s64;
typedef unsigned __int64    u64;

using namespace std;

const   s64     dx[4]       = {-1, 0, 1, 0};
const   s64     dy[4]       = {0, -1, 0, 1};

int main ()
{
    string email;
    cin>>email;
//  string email = "dotdotdotatdotdotat";

    for (int i = 1; i < (email.size() - 2); i++)
    {
        if ((email[i] == 'a') && (email[i + 1] == 't'))
        {
            email[i] = '@';
            email.erase(i + 1, 1);
            break;
        }
    }

    for (int i = 1; i < (email.size() - 3); i++)
    {
        if ((email[i] == 'd') && (email[i + 1] == 'o') && (email[i + 2] == 't'))
        {
            email[i] = '.';
            email.erase(i + 1, 2);
        }
    }

    cout<<email;

    return 0;
}

#include <stdlib.h>
#include <string.h>
#include <vector>
#include <map>
#include <list>
#include <set>
#include <fstream>
#include <iostream>
#include <queue>
#include <algorithm>
#include <time.h>
#include <sstream>
#include <limits.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include <time.h>

#define pb(a) push_back(a)
#define sz size()
#define ALL(a) a.begin(),a.end()
#define ALLR(a) a.rbegin(),a.rend()
#define X first
#define Y second
#define mp(a,b) make_pair(a,b)

typedef long long ll;
typedef double ld;

template<typename T> inline void SWAP(T &a, T &b){T tmp=a;a=b;b=tmp;}
template<typename T> inline T ABS(const T &val) {return val<0?-val:val;}
template<typename T> inline T MAX(T a, T b){return a>b?a:b;}
template<typename T> inline T MIN(T a, T b){return a<b?a:b;}
template<typename T> inline T SQR(const T &a){return a*a;}
#define MAX(a,b) (a>b?a:b)
#define MIN(a,b) (a>b?b:a)
#define MSET(d) memset(d,0,sizeof(d))
#define forn(i,n) for(int i=0;i!=n;i++)
#define for1(i,n) for(int i=1;i<=n;i++)
#define forab(i,a,b) for(int i=a;i!=b;i++)
#define for1ab(i,a,b) for(int i=a+1;i<=b;i++)
#define fordab(i,a,b) for(int i=b-1;i>=a;i--)
#define ford1ab(i,a,b) for(int i=b;i!=a;i--)
#define ford(i,n) for(int i=n-1;i!=-1;i--)
#define ford1(i,n) for(int i=n;i!=0;i--)

const int INTinf = 1000000000;
const int nINTinf = 0-2147483648;
const ll LLinf = 9223372036854775807LL;

using namespace std;
typedef pair<int, int> pii;
string s;
int main(){
#ifdef _DEBUG
	freopen("input.txt","r",stdin);
#endif
	cin>>s;
	bool at=false;
	for(int i=1;s.sz>i;i++){
		if (s.sz-i>3){
			if (s[i]=='d' && s[i+1]=='o' && s[i+2]=='t'){
				s = s.substr(0, i)+'.'+s.substr(i+3);
			}
		}
		if (!at){
			if (s[i]=='a' && s[i+1]=='t'){
				s = s.substr(0, i)+'@'+s.substr(i+2);
				at=true;
			}
		}
	}
cout<<s<<endl;
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main() {

	string z;
	cin >> z;
	string a = "dot", b = "at";
	vector<int> v;
	vector<int> ca;
	int s = -1;
	vector<char> k(z.size(), 0);
	for (int i = 0; i < z.size() - 2; i++) {
		string temp;
		temp += z[i];
		temp += z[i + 1];
		temp += z[i + 2];
		if (temp == a && i > 0 && i + 2 != z.size() - 1) {
			v.push_back(i);
			i += 2;
		} else {
			k[i] = z[i];
		}
	}
	if (v.size() != 0) {
		int t = v[v.size() - 1] + 3;
		int h = 2;
		h = z.size() - t;
		for (int i = z.size() - h; i < z.size(); i++)
			k[i] = z[i];
	}
	for (int i = 0; i < z.size() - 1; i++) {
		string temp;
		temp += z[i];
		temp += z[i + 1];
		if (temp == b && i > 0) {
			if (s == -1) {
				s = i;
				k[i + 1] = 0;
			}
		}
		if (v.size() == 0) {
			if (s != -1 && i != s + 1)
				k[i] = z[i];

		}
	}
	if (v.size() == 0) {
		k[z.size() - 1] = z[z.size() - 1];
	}
	for (int i = 0; i < v.size(); i++) {
		k[v[i]] = '.';
	}
	k[s] = '@';
	string res;
	for (int i = 0; i < k.size(); i++) {
		//	cout << k[i];
		if (k[i])
			res += k[i];
	}
	cout << res << endl;

}

#include<bits/stdc++.h>

using namespace std;

int main()
{
    string s;
    cin>>s;
    cout<<s[0];
    bool flag=false,last=false;
   int  n= s.size()-1;
    int i;
    for(i=1;i<s.size()-2;i++)
    {
        if(s[i]=='d' && s[i+1]=='o' && s[i+2]=='t')
        {
            if((i+2)!=n)
            {
                cout<<".";
                i+=2;
            }
            else
                last=true;

        }
        else if(s[i]=='a' && s[i+1]=='t' && flag==false)
        {
            cout<<"@";
            flag =true;
            i+=1;
        }
        else
        {
            cout<<s[i];
        }
    }
    int j;
    if(last)
        i--;
    if(i<s.size())
    {
        for(j=i;j<s.size();j++)
            cout<<s[j];
    }
    return 0;
}

#include <iostream>
#include <algorithm>
#include <cmath>
#include <math.h>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <iomanip>
#include <cstring>
#include <queue>
#include <bitset>
using namespace std;
typedef long long ll;
#define pb push_back
#define endl "\n"
#define all v.begin(),v.end()
const int N=1e7+100;
const double PI=3.1415926536;
vector <ll>v;
ll n,m,k,t,sum,l,r,p,e,d,c,b,a;
string ans="";
bool f;
string s;
set< ll >st;
map<pair<ll,ll> ,ll>mp;
map<ll,ll>mpx,mpy;
int main(){
    ios_base::sync_with_stdio(0); cin.tie(NULL);
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    cin >>s;
    n=s.size();
    for (int i=0;i<n;){
        if (s.substr(i,3)=="dot"){
            if (i==0 || i==n-3){
                ans+="dot";
                i+=3;
                continue;
            }
            else {
                i+=3;
                ans+='.';
            }
        }
        else if (s.substr(i,2)=="at"){
            if (i==0 || i==n-2){
                ans+="at";
                i+=2;
                continue;
            }
            else {
                if (!f){ans+='@';f=true;}
                else ans+="at";
                i+=2;
            }
        }
        else{
            ans+=s[i];
            i++;
        }
    }
    cout <<ans;
    return 0;
}

#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
char ss[1111];
int main()
{
    scanf("%s",ss);
    int len=strlen(ss);
    putchar(ss[0]);
    int f=0;
    for(int i=1;i<len;i++)
    {
        if(ss[i]=='d'&&ss[i+1]=='o'&&ss[i+2]=='t'&&i+2!=len-1)
        {
            putchar('.');
            i+=2;
        }
        else if(ss[i]=='a'&&f==0&&ss[i+1]=='t'&&i+1!=len-1)
        {
            putchar('@');
            i++;
            f=1;
        }
        else putchar(ss[i]);
    }
    printf("\n");
}
/*2017-08-06 19:20:17.277*/

#include<iostream>
#include<algorithm>
#include<iomanip>
#include<vector>
#include<map>
#include<deque>
#include<utility>
#include<string>
#include<set>
#include<math.h>
#include<iterator>
#define f first
#define s second
using namespace std;

long long i, n, b, k, m, j, r, kol;
long long a[5000];
string s;

int main() {
	cin >> s;
	s+= "~";
	s+= "~";
	for (i = 0; i < s.length() - 2; i++) {
		if (s[i] == 'd' && s[i + 1] == 'o' && s[i + 2] == 't' && i > 0 && i + 3 < s.length() - 2) {
			cout << '.';
			i += 2;
		}
		else if (s[i] == 'a' && s[i + 1] == 't' && i > 0 && i + 2 < s.length() - 2 && kol == 0) {
			kol = 1;
			cout << '@';
			i += 1;
		}
		else {
			cout << s[i];
		}
	}
}

#include<iostream>
#include<vector>
#include<bitset>
#include<fstream>
#include<string>
#include<algorithm>
#include<utility>
#include<cmath>

#define speed ios::sync_with_stdio(0); cin.tie(0);
#define endl '\n'

using namespace std;

string ss;
vector<int> dots;
bool ok;
int at;
int main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif

	cin >> ss;
	for (int i = 1; i < ss.size(); i++)
	{
		if( ss[i] == 'd' && ss[i + 1] == 'o' && ss[i + 2] == 't')
			dots.push_back(i);
		if (ss[i] == 'a' && ss[i + 1] == 't' && !ok) {
			at = i; ok = true;
		}
	}
	sort(dots.begin(), dots.end());
	reverse(dots.begin(), dots.end());
	for (int i = 0; i < dots.size(); i++)
	{
		if (ok && at > dots[i] && at < ss.size() - 2)
		{
			ss.replace(at, 2, "@");
			ok = false;
		}
		if(dots[i] < ss.size() - 3)  ss.replace(dots[i], 3, ".");
	}
	if (ok && at < ss.size() - 2)  ss.replace(at, 2, "@");
	cout << ss << endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;

#define f(i,a,b) for(int i=(int)(a);i<=(int)(b);i++)
#define char_f(i,a) for(int i=(int)(a);(char)s[i]!='\0';i++)
#define rf(i,a,b) for(int i=(int)(a);i>=(int)(b);i--)
#define llf(i,a,b) for(long long int i=(long long int)(a);i<=(long long int)(b);i++)
#define llrf(i,a,b) for(long long int i=(long long int)(a);i>=(long long int)(b);i--)

#define ll long long
#define fi first
#define se second
#define pb push_back
#define pob pop_back
#define mem(ara,x) memset((ara),x,sizeof(ara))
#define memn(ara) memset((ara),-1,sizeof(ara))
#define bb begin()
#define ee end()
#define em emplace
#define eb emplace_back

#define si set<int>
#define sd set<double>
#define sll set<long long int>
#define ss set<string>
#define sc set<char>

#define pii pair<int,int>
#define pli pair<long long int,int>
#define pil pair<int,long long int>
#define pll pair<long long int,long long int>
#define pci pair<char,int>
#define pic pair<int,char>
#define pcl pair<char,long long int>
#define plc pair<long long int,char>

#define pss pair<string,string>
#define pcc pair<char,char>

#define pis pair<int,string>
#define psi pair<string,int>
#define pls pair<long long int,string>
#define psl pair<string,long long int>
#define pdd pair<double,double>
#define pcs pair<char,string>
#define psc pair<string,char>

#define vi  vector<int>
#define vll vector<long long int>
#define vd vector<double>
#define vs vector<string>
#define vc vector<char>
#define vii vector<pii>

#define mod 1000000007
#define mx (1<<30)-1
#define llmx (1ll<<62)
#define n_size 100005
#define g_size 10000005
double PI=acos(-1);
#define eps 1e-9

///unsigned int uMAX=4294967295;
///unsigned ll int ullMAX=18446744073709551615;

int arr[g_size];

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	int n,m,T,res;

	int maxi=-mx,mini=mx,count=0;

	int i,j,k;

	bool flag;

	string s1,s2;

	char s[100000];

	int ara[n_size],ara2[n_size];

	cin>>s1;

	s1="-"+s1+"---";

	count=1;

	for(i=1;i<=s1.length()-4;i++){
        if(s1[i]=='d' && s1[i+1]=='o' && s1[i+2]=='t' && (i>1 && i+3-1<s1.length()-4)){
            s2+='.';
            i=i+3-1;
        }
        else if(count==1 && s1[i]=='a' && s1[i+1]=='t' && (i>1 && i+2-1<s1.length()-4)) {
            s2+='@';
            i=i+2-1;
            count--;
        }
        else{
            s2+=s1[i];
        }

	}

	cout<<s2<<endl;

}

#include <bits/stdc++.h>
using namespace std;
int main(){
    int i, j, len, fl = 0;
    string str;
    cin >> str;
    len = str.size();

    if(str[0] == 'd' && str[1] == 'o' && str[2] == 't')
        i = 3;
    else if(str[0] == 'a' && str[1] == 't')
        i = 2;
    else
        i = 0;
    if(str[len - 3] == 'd' && str[len - 2] == 'o' && str[len - 1] == 't')
        j = len - 3;
    else if(str[len - 2] == 'a' && str[len - 1] == 't')
        j = len - 2;
    else
        j = len;

    if(i == 3)
        cout << "dot";
    else if(i == 2)
        cout << "at";

    for(i = i; i <= j - 1; i++){
        if(str[i] == 'd' && str[i + 1] == 'o' && str[i + 2] == 't'){
            cout << '.';
            i = i + 2;
        }
        else if(fl == 0 && str[i] == 'a' && str[i + 1] == 't'){
            cout << '@';
            i = i + 1;
            fl = 1;
        }
        else
            cout << str[i];
    }

    if(j == len - 3)
        cout << "dot" << endl;
    else if(j == len - 2)
        cout << "at" << endl;

    return 0;
}

#include<iostream>
#include<string>

using namespace std;
string s;
int main(){
    cin>>s;
    int n=s.size();
    char c=s[0],cc=s[n-1]; s[0]=s[n-1]='.';
    int x=s.find("at"); s.erase(x,2); s.insert(x,"@");
    x=s.find("dot");
    while (x!=-1){
        s.erase(x,3); s.insert(x,".");
        x=s.find("dot");
    }
    n=s.size();
    s[0]=c; s[n-1]=cc;
    cout<<s;
    return 0;
}

#include <cstdio>
#include <cstring>
#include <vector>
using namespace std;

char s[121];
vector<char> t;
int len;

int main() {
	scanf("%s", s); len = strlen(s);
	bool fat = false;
	for (int i = 0; i < len; ++i) {
		if (i == 0) {
			t.push_back(s[i]);
			continue;
		}
		if (i < len - 2 && s[i] == 'a' && s[i + 1] == 't' && !fat) {
			t.push_back('@');
			fat = true;
			++i;
			continue;
		}
		if (i < len - 3 && s[i] == 'd' && s[i + 1] == 'o' && s[i + 2] == 't') {
			t.push_back('.');
			i += 2;
			continue;
		}
		t.push_back(s[i]);
	}
	for (int i = 0; i < t.size(); ++i)
		printf("%c", t[i]);
	printf("\n");
	return 0;
}

#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define repp(i, a, b) for (int i = a; i < b; i++)
#define all(v) v.begin(), v.end()
#define sz(v) (int)v.size()
typedef long long ll;
typedef pair<int, int> pii;

vector<int> mult(vector<int> &a, vector<int> &b) {
	vector<int> c(a.size() + b.size());
	for (size_t i = 0; i < a.size(); ++i) {
		for (int j = 0, carry = 0; j < (int)b.size() || carry; ++j) {
			long long cur = c[i + j] + a[i] * 1ll * (j < (int)b.size() ? b[j] : 0) + carry;
			c[i + j] = int(cur % 10);
			carry = int(cur / 10);
		}
	}
	while (c.size() > 1 && c.back() == 0) c.pop_back();
	return c;
}

int main() {
	//freopen("dragons.in", "r", stdin);
	//freopen("dragons.out", "w", stdout);
	ios_base::sync_with_stdio(0);
	string s;
	cin >> s;
	bool at = false;
	string ans;
	ans.push_back(s[0]);
	repp(i, 1, sz(s)) {
		if (!at && i + 1 < sz(s) && s[i] == 'a' && s[i + 1] == 't') {
			ans.push_back('@');
			at = true;
			i++;
		}
		else if (i + 2 < sz(s) - 1 && s[i] == 'd' && s[i + 1] == 'o' && s[i + 2] == 't') {
			ans.push_back('.');
			i += 2;
		}
		else ans.push_back(s[i]);
	}
	cout << ans;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
#define random(x) (rand()%x)
const int maxn=100005,INF=0x3f3f3f3f,mod=1000000007;
string s,t;
bool bUa=true;
int main(){
	cin >> s;
	t.push_back(s[0]);
	for(int i=1;i<s.size();){
		if(i+3<s.length()&&s.substr(i,3)=="dot"){
			t.push_back('.');
			i+=3;
			continue;
		}
		if(bUa&&i+2<s.length()&&s.substr(i,2)=="at"){
			t.push_back('@');
			bUa=false;
			i+=2;
			continue;
		}
		t.push_back(s[i]);
		i++;
	}
	cout<<t<<endl;
	return 0;
}

#include<iostream>
#include<string>
using namespace std;
int main()
{
	string str,fs;
	cin>>str;
	int len=str.size();
	bool at=false;
	fs+=str[0];
	for(int i=1;i<len;i++)
	{
		if(i+3<len && str[i]=='d' && str[i+1]=='o' &&str[i+2]=='t')
		{
			fs+='.';
			i+=2;
		}
		else if(!at && str[i]=='a' &&str[i+1]=='t')
		{
			fs+='@';
			i++;
			at=true;
		}
		else
			fs+=str[i];
	}
	cout<<fs<<endl;
	//cin>>len;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
	string s;
	cin>>s;
	int n=s.size();
	bool at=false;
	for(int i=0;i<s.size();i++)
	{
		if(i>0)
		{
			if(s[i]=='a' and s[i+1]=='t' and i<n-2 and !at)
			{
				at=true;
				cout<<'@';
				i+=1;
				continue;
			}
			if(s[i]=='d' and s[i+1]=='o' and s[i+2]=='t' and i<n-3)
			{
				cout<<'.';
				i+=2;
				continue;
			}
		}
		cout<<s[i];
	}
	return 0;
}

#include<bits/stdc++.h>
#define    fio     ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define    eps     1e-9
#define    pi      acos(-1.0)

using namespace std;
typedef long long ll;

void solve()
{
    string s;
    cin>>s;
    int l=s.size();
    vector <char> v;
    bool b=true;
    for(int i=0;i<l;i++)
    {
        if(s[i]=='d' && s[i+1]=='o' && s[i+2]=='t' && i!=0 && (i+2)!=(l-1))
        {
            v.push_back('.');
            i+=2;
        }
        else if(b && s[i]=='a' && s[i+1]=='t' && i!=0 && (i+1)!=(l-1))
        {
            v.push_back('@');
            i+=1;
            b=false;
        }
        else
        {
            v.push_back(s[i]);
        }
    }
    for(int i=0;i<v.size();i++)
    {
        cout<<v[i];
    }
    cout<<endl;
}
int main()
{
    fio;
    int tc=1;
///    cin>>tc;
///    int i=0;
    while(tc--)
    {
        solve();
    }
    return 0;
}

#include <bits/stdc++.h>
#define MIN -1
#define MAX 1e9+7
#define SMAX 2*(1e18)+7
#define all(a) a.begin (), a.end()
#define mk  make_pair
#define pb  push_back
#define F first
#define S second
#define tri(a)  (a*(a+1))/2
#define fixed(a, c)  fixed<<setprecision(c)<<a
#define mem(a, c) memset(a, c, sizeof a)
#define sub(a, b, c) a.substr(b, c)
#define rall(a) a.rbegin(), a.rend()
#define lower(a, c) lower_bound(a.begin (), a.end (), c);
#define upper(a, c) upper_bound(a.begin (), a.end (), c);
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define PI 3.14159265359
using namespace std;
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
typedef   long long int  ll;
typedef pair <int, int> ii;
typedef vector <ll> vll;
typedef vector <int> vi;
typedef vector <ii> vii;
typedef vector <vi> vvi;
typedef priority_queue <ll, vector <ll>, greater <ll> > pq;
typedef double db;
int getint(string  s)
{
    int x=stoi(s);
    return x;
}
string getstring (int x)
{
    string lol=to_string(x);
    return lol;
}

bool ok(int x, int gg)
{
    return (x<=gg-1 and x>=0);
}
int X[4]= {1, 0, -1, 0};
int Y[4]= {0, 1, 0, -1};
/*freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);*/
int gcd(int a, int b)
{
    if (a == 0)
        return b;
    return gcd(b % a, a);
}
ll lcm(ll a, ll b)
{
    return (a*b)/gcd(a, b);
}
ll exponentMod(ll A, ll B, ll C)
{
    if (A == 0)
        return 0;
    if (B == 0)
        return 1;
    ll y;
    if (B % 2 == 0)
    {
        y = exponentMod(A, B / 2, C);
        y = (y * y) % C;
    }
    else
    {
        y = A % C;
        y = (y * exponentMod(A, B - 1, C) % C) % C;
    }
    return (ll)((y + C) % C);
}
bool ispal(string x)
{
    for(int i=0, j=x.size ()-1; i<x.size (); i++, j--)
    {
        if(i>j)break;
        if(x[j]!=x[i])return false;
    }
    return true;
}
//VIVA      EL       GG!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

int main()
{
    string s;
    while(cin>>s){
        string ans;
        int n=s.size ();
        ans+=s[0];
       // ans+=s[1];
       int sw=0;
        for(int i=1;i<n;i++){
            if(s[i]=='a' && s[i+1]=='t'){
                if(i+1==n-1){
                    ans+=s[i];
                    ans+=s[i+1];
                    i++;
                }else{
                if(!sw){
                i++;
                ans+='@';sw=1;
                }else {
                    ans+=s[i];ans+=s[i+1];
                    i++;
                }
                }
                continue;
            }
            if(s[i]=='d' && s[i+1]=='o' && s[i+2]=='t'){
                if(i+2==n-1){
                    ans+=s[i];
                    ans+=s[i+1];
                    ans+=s[i+2];
                    i+=2;
                }else{
                i+=2;
                ans+='.';
                }continue;
            }else ans+=s[i];
        }
        cout<<ans<<endl;
    }
}

#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
char c[1000],ans[1000];
int main()
{
    scanf("%s",c);
    int len=strlen(c);
    int j=0;
    int flag1=1;
    for(int i=0;i<len;i++)
    {
        if(c[i]=='a')
        {
            if(flag1&&i!=0&&i!=len-2&&c[i+1]=='t')
            {
                  ans[j++]='@';
                  i++;
                  flag1=0;
            }
            else
                 ans[j++]='a';

        }
        else if(c[i]=='d')
        {
            if(i!=0&&i!=len-3&&c[i+1]=='o'&&c[i+2]=='t')
            {
                ans[j++]='.';
                i+=2;
            }
            else
                ans[j++]='d';

        }
        else
            ans[j++]=c[i];

    }
    ans[j]=0;
    puts(ans);

    return 0;
}
/*
jjdot
jjjjjjjjat
*/
/*2017-08-06 20:26:28.303*/

#include <stdio.h>
#include <math.h>
#include <string.h>
#include <queue>
#include <stack>
#include <iostream>
#include <time.h>

#ifdef _DEB

    #define Pr(x) { cerr << #x << " = " << x << "\n"; }

#endif

#ifndef _DEB

    #define Pr(x) {  }

#endif

using std::queue;
using std::stack;
using std::cin;
using std::cout;
using std::cerr;

int main()
{

    //OpenFiles
    //freopen ("input.txt", "r", stdin);
    //freopen ("output.txt", "w", stdout);

    //Input
    char str[105];
    char result[105];

    cin >> str;

#ifdef _DEB
clock_t time = clock();
#endif

    //Calculation
    int i=1;

    while (str[i] != '\0')
    {
        if (str[i] == 'a' && str[i+1] == 't' && str[i+2] != '\0')
        {
            str[i++] = '@';

            while (str[i] != '\0')
            {
                str[i] = str[i+1];
                ++i;
            }
            break;
        }
        ++i;
    }

    Pr(str);

    i=1;
    result[0] = str[0];
    int c = 1;
    while (str[i] != '\0')
    {
        if (str[i] == 'd' && str[i+1] == 'o' && str[i+2] == 't' && str[i+3] != '\0')
        {
            result[c++] = '.';
            i+=2;
        }
        else
        {
            result[c++] = str[i];
        }
        ++i;
    }
    result[c] = '\0';

    //Output
    cout << result << "\n";

#ifdef _DEB
time = clock() - time;
Pr(time);
#endif

    //CloseFiles
    fclose (stdin);
    fclose (stdout);

    return 0;
}

#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <math.h>
using namespace std;
typedef long long ll;

int main(int argc, const char * argv[]) {
    string s,t;
    cin>>s;
    int n = (int)s.length();
    t+=s[0];
    int i;
    for(i = 1;i< n-3;i++){
        if(s[i] == 'd' && s[i+1] == 'o' && s[i+2] == 't'){
            t+='.';
            i+=2;
        }
        else{
            t+=s[i];
        }
    }
    for(;i<n;i++) t+=s[i];

    s = t;
    t="";
    n = (int)s.length();
    bool flag = false;
    t+=s[0];
    for(i = 1;i<n-2;i++){
        if(flag == false && s[i] == 'a' && s[i+1] == 't'){
            flag = true;
            t+='@';
            i+=1;
        }
        else{
            t+=s[i];
        }
    }
    for(;i<n;i++)  t+=s[i];

    cout<<t;
    return 0;
}

#include<iostream>
#include<string>
#include<algorithm>

using namespace std;

int main() {
    string s;
    cin>>s;
    while(1) {
              int f=s.find("dot",1);
              if(f==-1 || f==s.size()-3)break;
              s=s.replace(f,3,".");
    }
    if(s.find("at",1)!=-1)s=s.replace(s.find("at",1),2,"@");
    cout<<s<<endl;
    //system("pause");
    return 0;
}

#include <iostream>
#include <sstream>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
using namespace std;
int main()
{
	string e, res;
	cin >> e;
	transform(e.begin(), e.end(), e.begin(), tolower);
	for (int i = 0, j = e.size(), k = (e.find("@", 0) != string::npos); i < j; ++i)
	{
		if (i != 0 && i + 2 < j && e[i] == 'd' && e[i + 1] == 'o' && e[i + 2] == 't')
		{
			res += '.';
			i += 2;
			continue;
		}
		if (i != 0 && k == 0 && i + 1 < j && e[i] == 'a' && e[i + 1] == 't')
		{
			k = 1;
			res += '@';
			i += 1;
			continue;
		}
		res += e[i];
	}
	if (res[res.size() - 1] == '@')
	{
		res = res.substr(0, res.size() - 1) + "at";
	}
	if (res[res.size() - 1] == '.')
	{
		res = res.substr(0, res.size() - 1) + "dot";
	}
	cout << res << endl;
	return 0;
}

/*
¦¦¦¦¦¦¦¦¦¦¯¯¯¦¦¦¦¦¦___¦¦¦¦¦¦¦¦¦¦
¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¯¯¯¦¦¦¦_¦¦¦¦¦¦¦
¦¦¦¦¦¦¦¦¦¦_¦¦¦¦¦¦¦¯¦¦¦¯¦¦¦_¦¦¦¦¦
¦¦¦¦¦¦¦¦_¦¦¦¦¦¦¦¯¦¦¦¦¦¦¦¯¦¦¦_¦¦¦
¦¦¦¦¦¦_¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦_¦¦
¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦_¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
¦¦¦¦¦¯¦¦¦¦¦¯¦¯¦¦¦_¦¦¦¦¦¦¦¦¦¦¦¦¦¦
¦¦¦¦¦¦¦¯¦¯¦¦¦¦¦¯¦¦¦_¦¦¦¦¦¦¦¦¦¦¦¦
¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¯¦¦¦_¦¦¦¦¦¦¦¦¦¦
¦¦¦¦_¦¦_¦¦¦¦¦¦¦¦¦¦¦¯¦¦¦_¦¦¦¦¦¦¦¦
¦¦_¦¦¦¦¦¦_¦¦¦¦¦¦¦¦¦¦¦¯¦¦¦_¦¦¦¦¦¦
¦¦¦¦¦¦¯¯¦¦¦¦__¦¦¦¦¦¦¦¦_¦¦¦¦¦¦¦¦¦
¦¦¦¦¦¯¦¦¦¯¯¦¦¦¦¦____¦¦¦¦¦¦¦¦¦_¦¦
¦¦¯¯¦¦¦¦¦¦¦¦¦¯¯¦¦¦¦¦¦¯¯¦¦¦¯¯¦¦¦¦
*/
#include <bits/stdc++.h>
using namespace std;
int p;
string s;
int main()
{
    cin >> s;
    p = s.find("at", 1);
    s.replace(p, 2, "@");
    p = 1;
    while (1) {
        p = s.find("dot", p);
        if (p == -1 || p == (int)s.size() - 3)
            break;
        s.replace(p, 3, ".");
    }
    cout << s << endl;
    return 0;
}

	#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
#include <map>
#include <set>
#include <cmath>
#include <sstream>

#define pb push_back
#define mp make_pair
#define PI 3.14159265358979
#define sqr(x) (x)*(x)
#define forn(i, n) for(int i = 0; i < n; ++i)
#define ALL(x) x.begin(), x.end()
#define sz(x) int((x).size())
#define X first
#define Y second
typedef long long ll;
typedef long double ld;
using namespace std;
typedef pair<int,int> pii;
const int INF = 2147483647;
const ll LLINF = 9223372036854775807LL;

int main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	string s; cin >> s;
	vector<string> v;
	v.pb("");
	for (int i = 0; i < s.length(); ++i) {
		v.back() += s[i];
		string t = v.back();
		if (t.length() >= 2 && t.substr(t.length() - 2) == "at") v.back() = v.back().substr(0, t.size() - 2), v.pb("@"), v.pb("");
		if (t.length() >= 3 && t.substr(t.length() - 3) == "dot") v.back() = v.back().substr(0, t.size() - 3), v.pb("."), v.pb("");
	}
	if (v.back() == "") v.pop_back();
	bool hasat = 0;
	int f = 0;
	if (v.front() == "") f++;
	for (int i = 0; i < v.size(); ++i) {
		if (v[i] != "." && v[i] != "@") cout << v[i];
		else if (v[i] == ".") {
			if (i != f && i != v.size() - 1) cout << v[i];
			else cout << "dot";
		} else if (v[i] == "@") {
			if (!hasat && i != f && i != v.size() - 1) {
				hasat = 1;
				cout << "@";
			} else {
				cout << "at";
			}
		}
	}
	return 0;
}

#include<iostream>
using namespace std;
string s;
int n,i,p=-1;
void f(char c,string t)
{
    if(s[0]==c)s.replace(0,1,t);
    if(s[s.size()-1]==c)s.replace(s.size()-1,1,t);
}
int main()
{
    cin>>s;
    while(s.find("at")!=string::npos)s.replace(s.find("at"),2,"@");
    while(s.find("dot")!=string::npos)s.replace(s.find("dot"),3,".");
    f('.',"dot");
    f('@',"at");
    for(;s[i];i++)
    {
        if(s[i]=='@')
        {
            if(!n)p=i;
            n++;
        }
    }
    if(n<2)
    {
        cout<<s;
        return 0;
    }
    for(i=s.size()-1;i>=0;i--)
    {
        if(s[i]=='@')
        {
            s.replace(i,1,"at");
            if(--n==1)
            {
                cout<<s;
                return 0;
            }
        }
    }
}

#include <cstdio>
#include <iostream>
#include <cmath>
#include <cstring>
#include <cctype>
using namespace std;
char s[200],s2[200];
int n;
int main () {
#ifndef ONLINE_JUDGE
	freopen ("input.txt","r",stdin);
	freopen ("output.txt","w",stdout);
#endif
	cin>>s;
	int len=strlen(s);
	for (int i=1; i<len-2; i++) {
		if (strncmp(s+i,"at",2)==0) {
			s[i]=0;
			strcpy(s2,s);
			strcat(s2,"@");
			strcat(s2,s+i+2);
			break;
		}
	}
	len=strlen(s2);
	for (int i=1; i<len-3; i++) {
		if (strncmp(s2+i,"dot",3)==0) {
			s2[i]=s2[i+1]=s2[i+2]=0;
			s2[i]='.';
		}
	}
	for (int i=0; i<len; i++)
		if (s2[i]) putchar(s2[i]);
}

#include<bits/stdc++.h>
using namespace std;
string s,ans;
bool u=false;
bool chdot(int i)
{
    if(s[i]=='d'&&s[i+1]=='o'&&s[i+2]=='t')
        return true;
    return false;
}
bool chat(int i)
{
    if(s[i]=='a'&&s[i+1]=='t')
        return true;
    return false;
}
int main()
{
    cin>>s;
    for(int i=0;i<s.size();)
    {
        if(i!=0&&i+2!=s.size()-1&&s[i]=='d'&&chdot(i))
        {
            ans.push_back('.');
            i+=3;
            continue;
        }
        if(!u&&i!=0&&i+1!=s.size()-1&&s[i]=='a'&&chat(i))
        {
            ans.push_back('@');
            i+=2;
            u=true;
            continue;
        }
        ans.push_back(s[i]);
        i++;
    }
    for(int i=0;i<ans.size();i++)
        cout<<ans[i];
    return 0;
}

#include<stdio.h>
#include<string>
#include<iostream>
using namespace std;
int len;
bool flag;
string in,out;
void dfs(int i)
{
    if(i==len)return;
    if(i!=0&&i+1<len&&flag==0&&in[i]=='a'&&in[i+1]=='t')
    {
        out+='@';
        flag=1;
        dfs(i+2);
    }
    else if(i!=0&&i!=len-3&&in[i]=='d'&&in[i+1]=='o'&&in[i+2]=='t')
    {
        out+='.';
        dfs(i+3);
    }
    else
    {
        out+=in[i];
        dfs(i+1);
    }

}
int main()
{
    int n,sum,i,j;
    //freopen("a.txt","r",stdin);
    while(cin>>in)
    {
        flag=0;
        out="";
        len=in.size();
        dfs(0);
        cout<<out<<endl;
    }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
char a[101];
int len;
string s;
bool flag;
int main()
{
    scanf("%s",&a);
    len=strlen(a);
    for(int i=0;i<len;i++)
        if(a[i]=='@') flag=true;
    for(int i=0;i<len;i++)
    {
    	if(a[i]=='d'&&a[i+1]=='o'&&a[i+2]=='t'&&i!=0&&i!=len-3)
    	   s+='.',a[i]=' ',a[i+1]=' ',a[i+2]=' ';
    	if(a[i]=='a'&&a[i+1]=='t'&&i!=0&&i!=len-2&&flag==false)
		   s+='@',a[i]=' ',a[i+1]=' ',flag=true;
		else if(a[i]!=' ') s+=a[i];
	}
	cout<<s;
	cout<<endl;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
string st;
int len;
char head,tail;
void init_string(){
	cin >> st;
	len=st.length();
	head=st[0];
	tail=st[len-1];
	st=st.substr(1,len-2);
	len-=2;
}
string ans;
int main(){
	init_string();
	bool at=true;
	for (int i=0;i<len;i++){
		string tmp;
		if (i<=len-3){
			tmp=st.substr(i,3);
			if (tmp=="dot"){
				ans=ans+".";
				i+=2;
				continue;
			}
		}
		if (i<=len-2 && at){
			tmp=st.substr(i,2);
			if (tmp=="at"){
				at=false;
				ans=ans+"@";
				i+=1;
				continue;
			}
		}
		ans=ans+st[i];
	}
	ans=head+ans+tail;
	cout << ans;
	return 0;
}
/*
input1
vasyaatgmaildotcom
input2
dotdotdotatdotdotat
input3
aatt
input4
dotdotdotdotdotdotdotdot
*/

#include <iostream>
#include <string>
using namespace std;

void main()
{
    string str;
    cin >> str;
    str.replace(str.find("at",1),2,"@");
    size_t found = str.find("dot",1);
    while(found!=string::npos && found<str.length()-3)
    {
        str.replace(found,3,".");
        found = str.find("dot",1);
    }
    cout << str;

}

#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <ctime>
#include <map>
#include <set>
#include <string>
#include <stack>
#include <queue>

using namespace std;

#define inf 1000*1000*1000
#define eps 1e-9
#define PI 3.1415926535897932385
#define forn(i, m, n) for(int (i) = m; i < (n); i++)
#define size(n) (int)(n).size()
#define vint vector<int>

template<class T> T MAX(T a, T b){
	if (b < a)
		return a;
	else
		return b;
}

template<class T> T MAX(T a, T b, T c){
	return MAX(a, MAX(b, c));
}

void print(string s){
	cout << s << endl;

	exit(0);
}

void solve(){
	string s;
	char a, b;

	cin >> s;

	a = s[0];
	b = s[size(s) - 1];

	s = s.substr(1, size(s) - 2);

	s.replace(s.find("at"), 2, "@");

	for (int i = s.find("dot"); i != -1; i = s.find("dot", i))
		s.replace(i, 3, ".");

	cout << a << s << b << endl;
}

int main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	solve();

	return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main(){
	int check=0;
	string a;
	getline(cin,a);
	for(int i=0;i<a.length();){
		if(a[i]=='d' && a[i+1]=='o' && a[i+2]=='t' && i+3!=a.length() && i!=0){
			cout<<'.';	i+=3;	continue;
		}
		if(a[i]=='a' && a[i+1]=='t' && i!=0 && check==0){
			cout<<'@';	i+=2;	check=1;	continue;
		}
		cout<<a[i];		i++;
	}
	return 0;
}

#include<bits/stdc++.h>
#define setzero(a) memset(a,0,sizeof(a))
#define setdp(a) memset(a,-1,sizeof(a))
#define sf(a) scanf("%d", &a);
#define sf2(a,b) scanf("%d%d", &a ,&b );
#define sf3(a,b,c) scanf("%d%d%d", &a ,&b,&c );
#define sfll2(a,b) scanf("%I64d%I64d", &a ,&b );
#define sfll3(a,b,c) scanf("%I64d%I64d%I64d", &a ,&b,&c );
#define sfll(a) scanf("%I64d", &a);
#define print(a) printf("%d\n", a);
#define printll(a) printf("%I64d\n", a);
#define printll2(a,b) printf("%I64d %I64d\n", a,b);
#define pr(a) printf("%.9f\n", a);

typedef long long ll;

using namespace std;

int main()
{
    string s;
    cin>>s;
    s="###"+s+"###";
    string ans="";
    bool check=0,check2=0,check3=0;
    for(int i=3; i<s.size()-3; i++)
    {
        if(s[3]=='d' && s[4]=='o' && s[5]=='t' && !check)
        {
            check=1;
            i+=2;
            ans+="dot";
        }
        else if(s[3]=='a' && s[4]=='t' && !check3)
        {
            check3=1;
            i++;
            ans+="at";
        }
        else if(s[i]=='d' && s[i+1]=='o' && s[i+2]=='t')
        {
            i+=2;
            ans+=".";
        }
        else if(s[i]=='a' && s[i+1]=='t' && !check2 )
        {
            check2=1;
            i++;
            ans+="@";
        }
        else
            ans+=s[i];
    }
    if(ans[ans.size()-1]=='.')
    {
        ans[ans.size()-1]='d';
        ans+="ot";
    }
    cout<<ans<<endl;
    return 0;
}

#include<iostream>
#include<string>
using namespace std;
char s[120];
int main()
{
	int i,j,k,flag,l;
	while(scanf("%s",&s)!=EOF)
	{
		flag=0;
		l=strlen(s);
		printf("%c",s[0]);
		for(i=1;i<l;i++)
		{
			if(s[i]=='d')
			{
				if(s[i+1]=='o'&&s[i+2]=='t')
				{
					if(i+2<l-1)
					{
						printf(".");
						i+=2;
					}
					else
						printf("%c",s[i]);
				}
				else
					printf("%c",s[i]);
			}
			else if(s[i]=='a'&&!flag)
			{
				if(s[i+1]=='t')
				{
					flag=1;
					printf("@");
					i++;
				}
				else
					printf("%c",s[i]);
			}
			else
				printf("%c",s[i]);
		}
	}
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

#define loop(i,n)for(i=0;i<n;i++)
#define INF 1000000000
using ll = long long int;
typedef pair<int,int> pii;
typedef vector<pii> vii;
typedef vector<int> vi;

#define MAX 100005
#define MOD 1000000007

long long binpow(long long a, long long b)
{
    long long res = 1;
    while (b > 0)
    {
        if (b & 1)
            res = res * a % MOD;
        a = a * a % MOD;
        b >>= 1;
    }
    return res;
}
int main()
{
    IOS;
    //freopen("inputfile.txt","r",stdin);
    string s;cin>>s;
    bool flag = false;
    for(int i=0;i<s.size();)
    {
        if(i>0 && i<s.size()-2)
        {
            if(s[i]=='a' && s[i+1]=='t' && flag==false)
            {
                flag = true;//it contains only 1 @ char.
                cout<<'@';
                i+=2;
            }
            else if(i<s.size()-3 && s[i]=='d' && s[i+1]=='o' && s[i+2]=='t')
            {
                cout<<".";
                i+=3;
            }
            else
            {
                cout<<s[i];
                i++;
            }
        }
        else
        {
            cout<<s[i];
            i++;
        }
    }
    cout<<endl;
        return 0;
}

#include <bits/stdc++.h>
#define MOD 998244353
#define pb push_back
#define int long long int
#define auto multiset<ll>::iterator
#define ll int
#define con 1000000007
using namespace std;

int32_t main()
{    ios_base::sync_with_stdio(false);
     cin.tie(NULL);
     cout.tie(NULL);
     ll i,j,k,n,m;
     ll t;
     ll r;
     string s;
     cin>>s;
     n=s.size();
     unordered_map<ll,bool> u;
     j=-1;
     for(i=0;i<n;)
     {
         if(i!=0 && i<n-3 && s[i]=='d' && s[i+1]=='o' && s[i+2]=='t')
         {
             u[i]=true;
             i=i+3;
         }
         else if(i!=0 && i<n-2 && s[i]=='a' && s[i+1]=='t' && j==-1)
         {
              j=i;
         }
         else
             i++;
     }
     for(i=0;i<n;)
     {
         if(u[i]==1)
         {cout<<".";
          i=i+3;}
         else if(i==j)
         {
             cout<<"@";
             i+=2;
         }
         else
         {
             cout<<s[i];
             i++;
         }
     }

}

#define watch4(a,b,c,d) cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl;
#define watch3(a,b,c) cerr <<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<endl;
#define watch2(a,b) cerr <<#a<<": "<<a<<" | "<<#b<<": "<<b<< endl;
#define hitAi ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#include <map>
#include <set>
#include<stack>
#include <queue>
#include <cmath>
#include <ctime>
#include <string>
#include <cstdio>
#include <vector>
#include <limits>
#include <climits>
#include <cstdlib>
#include <utility>
#include <iomanip>
#include <sstream>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;

int main(){
    string s;
    cin >> s;
    int n = s.size();
    s += "####";
    int i = 0 , beg = 0;
    string ans = "";
    for( i = 0; i < n; i++ ){
        if( s[i] == 'a' && s[i+1] == 't' && beg ){
            ans += '@';
            i += 2;
            break;
        }
        if( s[i] == 'd' && s[i+1] == 'o' && s[i+2] == 't' && beg ){
            ans += '.';
            i += 2;
        }
        else{
            ans += s[i];
            beg = 1;
        }
    }
    while( i < n ){
        if( s[i] == 'd' && s[i+1] == 'o' && s[i+2] == 't' && i+2 < n-1 ){
            ans += '.';
            i += 2;
        }
        else{
            ans += s[i];
        }
        i++;
    }
    cout << ans << "\n";
}

#include<iostream>
#include<string>
#include<cstring>
#include<cstdio>
#include<stdio.h>
using namespace std;
string s;
string str1;
bool q=false;
int main()
{
	cin>>s;
	for(int i=0;i<s.size();)
	{
		if(i!=s.size()-3&&s[i]=='d'&&s[i+1]=='o'&&s[i+2]=='t'&&i!=0)
		{
			str1+='.';
			i+=3;
			continue;
		}
		if(i!=s.size()-2&&s[i]=='a'&&s[i+1]=='t'&&!q&&i!=0)
		{
			str1+='@';
			i+=2;
			q=true;
			continue;
		}
		str1+=s[i];
		i++;
	}
	cout<<str1;
	return 0;
}

#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <vector>
#include <queue>
#include <cmath>
typedef long long LL;
using namespace std;

int main() {
	string s;
	string ans;
	cin>>s;
	bool ok=false;
    for(int i=0;i<s.length();) {
		if(!ok&&s[i]=='a'&&s[i+1]=='t'&&i&&i!=s.length()-2) {
			char c='@';
			ans.push_back(c);
			i+=2;
			ok=true;
		}else if(s[i]=='d'&&s[i+1]=='o'&&s[i+2]=='t'&&i!=s.length()-3&&i) {
			char c='.';
			ans.push_back(c);
			i+=3;
		}else {
			ans.push_back(s[i]);
			i++;
		}
	}
	cout<<ans<<endl;
	return 0;
}

//In the name of God
#include <iostream>
#include <string>
using namespace std;

string in, out;

int main(){
    cin >> in;
    int lng = in.length() - 3;
    out = "";
    out += in[0];
    bool at = false;
    int i = 1;
    while (i < lng){
        if (!at && in[i] == 'a' && in[i+1] == 't'){
            out += "@";
            at = true;
            i++;
        }else if (in.substr(i, 3) == "dot"){
            out += ".";
            i+=2;
        }else{
            out += in[i];
        }
        i++;
    }
//    cout << i << endl;
    if (!at){
        out += "@";
        i+=2;
    }
    while (i < in.length()){
        out += in[i++];
    }
    cout << out << endl;
    return 0;
}

#include <bits/stdc++.h>
#define pb push_back
typedef long long ll;
using namespace std;
int main()
{
	ios::sync_with_stdio(false);
	string e;
	string ans;
	cin>>e;
	e+=char(1);
	e+=char(1);
	e+=char(1);
	ans+=e[0];
	bool used=0;
	for (int i=1;i<e.size();)
	{
		if (i!=e.size()-6&&e[i]=='d'&&e[i+1]=='o'&&e[i+2]=='t')
		{
			ans+='.';
			i+=3;
			continue;
		}
		if (e[i]=='a'&&e[i+1]=='t'&&used==0&&i!=e.size()-2)
		{
			used=1;
			ans+='@';
			i+=2;
			continue;
		}
		ans+=e[i];
		i++;
	}
	for (int i=0;i<ans.size()-3;i++)
	{
		cout<<ans[i];
	}
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
string s;
int main()
{
    cin>>s;
	bool fal=false;
	cout<<s[0];
	for(int i=1;i<s.size()-1;)
	{
		if(s[i]=='a'&&s[i+1]=='t'&&!fal)
		{
			cout<<'@';
			i=i+2;
			fal=true;
			continue;
		}
		if(s[i]=='d'&&s[i+1]=='o'&&s[i+2]=='t'&&i+2<s.size()-1)
		{
			cout<<'.';
			i=i+3;
			continue;
		}
		cout<<s[i];
		i++;
	}
	cout<<s[s.size()-1];

}

#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <float.h>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <deque>
#include <locale>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <wchar.h>
#include <wctype.h>
#include <algorithm>
#include <bitset>
#include <map>
#include <iomanip>
#include <ios>
#include <iostream>
#include <vector>
#include <cwchar>
#include <cwctype>
#define mp make_pair
#define fs first
#define se second
#define memset(a,t) memset(a,t,sizeof(a))
#define all(v) v.begin(),v.end()
#define eprintf(...) fprintf(stderr, __VA_ARGS__),fflush(stderr)
#define MN 0LL
#define MX 20000000000000005
using namespace std;
int main(){
//	freopen("input.txt","r",stdin);
//	freopen("output.txt","w",stdout);
	ios_base::sync_with_stdio(false);
	string s;
	int i;
	cin>>s;
	for(i=1;i<s.size()-3;i++){
		if(s.substr(i,3)=="dot"){
			s[i]=s[i+1]=' ';
			s[i+2]='.';
		}
	}
	for(i=1;i<s.size()-2;i++){
		if(s.substr(i,2)=="at"){
			s[i]=' ';
			s[i+1]='@';
			break;
		}
	}
	for(i=0;i<s.size();i++) if(s[i]!=' ') cout<<s[i];
	return 0;
}

#include <iostream>

using namespace std;

int main()
{
    string s, g = ""; cin >> s;
    int n = s.size();
    bool ok = true;
    g += s[0];
    for(int i = 1; i < n; i++)
    {
        if(s[i] == 'a' and s[i+1] == 't' and ok and
                i+1 < n-1)
        {
            g += '@';
            ok = false;
            i++;
        }
        else if(s[i] == 'd' and s[i+1] == 'o' and
                s[i+2] == 't' and i+2 < n-1)
        {
            g += '.';
            i+=2;
        }
        else g += s[i];
    }
    cout << g << endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define sqr(a) ((a) * (a))
#define io() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define co() cout.precision(10);
#define F for(li i=0;i<n;i++)
#define fo(i,a,n) for(i=a;i<n;i++)
#define ne cout<<"\n";
#define test int t;cin>>t;while(t--)
//#define oj #ifndef ONLINE_JUDGE freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); #endif

typedef long long li;
typedef long double ld;

const li mod = 1000000007;

int main()
{
    io();
    string s,p;
    cin>>s;
    li n=s.length(),f=0;
    F
    {
        if(s[i]=='d' && (i==0 || i==n-3))
        {
            p+=s[i];
            continue;
        }
        if(f==0 && s[i]=='a' && s[i+1]=='t' && i!=0 && i!=n-2)
        {
            p+='@';
            i++;
            f=1;
        }
        else if(s[i]=='d' && s[i+1]=='o' && s[i+2]=='t')
        {
            i+=2;
            p+='.';
        }
        else
        p+=s[i];
    }
    cout<<p;
}

/*******************************
 Author: i_o__o_i
 Created: Wednesday 2020-04-08
********************************/
#include<bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#pragma GCC optimization("Ofast")

using namespace std;
using namespace __gnu_pbds;

typedef     long long   ll;

#define     CS(x) cout << "Case " << x << ": ";
#define     _test int TC; cin >> TC; while(TC--)
#define     sq(x) ((x) * 1LL * (x))
#define     eb emplace_back
#define     pb push_back
#define     all(_n) _n.begin(), _n.end()
#define     rall(_n) _n.rbegin(), _n.rend()
#define     Clear(a, b) memset(a, b, sizeof(a))
#define     sp << ' ' <<
#define     endl "\n"
#define     nl cout << endl
#define     D(x) cout << #x << " >>>>>> " << x << endl;
#define     D2(x, y) cout << #x << " >>> " << x << " # " << #y << " >>> " << y << endl;
#define     DD cout << "--\n";
#define     dbg cout << "!!ERROR ERROR ERROR!!" << endl;
#define     show(x) cout << x << endl
#define     precision(n) cout << fixed << setprecision(n);
#define     exeTime(fun){clock_t start, end; start = clock(); fun; end = clock(); double time_taken = double(end - start) / double(CLOCKS_PER_SEC); cout << "Execution time: " << time_taken << " secs."; }
#define     F first
#define     S second
#define     mini(a, b) a = min(a, b)
#define     maxi(a, b) a = max(a, b)
#define     sz(x) int( x.size() )
#define     gcd(a, b) __gcd(a, b)
#define     lcm(a, b) (abs((a) * (b)) / gcd(a, b))
#define     getbit(n, i) (((n) & (1LL << i)) != 0)
#define     setbit0(n, i) ((n) & (~(1LL << i)))
#define     setbit1(n, i) ((n) | (1LL << i))
#define     kbits(n, k) ((n) & ((1LL << k) - 1))
#define     LSSB(n) ((n) & (-(n)))
#define     isPowOf2(n) ((n > 0) && (((n) & (n-1)) == 0))
#define     parity(a, b) (a&1 ^ b&1)
#define     cond(__C, __R1, __R2) (__C ? __R1 : __R2)

inline bool _equal(double a, double b) { return fabs(a-b) < 1e-9; }
template<typename T> void print (T t){ for(const auto &it : t) cout << it << ' '; nl; }
template<class T> inline T min(T a, T b, T c){ return min(min(a, b), c); }
template<class T> inline T max(T a, T b, T c){ return max(max(a, b), c); }
template <typename T>  using orderedSet = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; // order_of_key find_by_order

//mt19937 mrand(random_device{}());
//int rnd(int x) { return mrand() % x;}

const    double Pi = acos(-1.0);
const    int Mod = 1e9 + 7;
const    int Eps = 1e-9;
const    int Inf = 1 << 30;
const    int Maxx = 1e5 + 10;

/******************************[Code Starts Here]********************************/

void _case()
{
    string s; cin >> s;
    queue<int> _dot, _at;
    string dot = "dot", at = "at", ans;

    for(int i = 0, j; i < sz(s)-3; i++) {
        for(j = 0; j < 3; j++) {
            if(s[i+j] != dot[j]) break;
        }
        if(j == 3 && i > 0 && i < sz(s) - 3) _dot.push(i);
    }

    for(int i = 0, j; i < sz(s)-2; i++) {
        for(j = 0; j < 2; j++) {
            if(s[i+j] != at[j]) break;
        }
        if(j == 2 && i > 0 && i < sz(s) - 2) _at.push(i);
    }
    for(int i = 0; i < sz(s); i++) {
        if(_dot.front() == i) {
            ans += '.';
            i += 2;
            _dot.pop();
        }
        else if(_at.front() == i) {
            ans += '@';
            i += 1;
            _at.pop();
        }
        else ans += s[i];
    }

    bool f = 0;
    for(int i = 0; i < sz(ans); i++) {
        if(ans[i] == '@') {
            if(!f) f = 1;
            else {
                cout << "at";
                continue;
            }
        }
        cout << ans[i];
    }
}

int main()
{
    ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
    _case();
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define rep(i,a,b) for(int i=a;i<b;i++)
#define repA(i,a,b) for(int i=a;i<=b;i++)
#define repD(i,b,a) for(int i=b;i>=a;i--)
#define fill(a) memset(a,0,sizeof(a))
#define f first
#define s second
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
int main()
{
    string str;
    cin>>str;
    string res="";
    res+=str[0];
    int flag=0;
    rep(i,1,str.size())
    {
        if(i<str.size()-3 && str.substr(i,3)=="dot")
        {
            res+=".";
            i+=2;
        }
        else if(flag==0 && str.substr(i,2)=="at" && i<str.size()-2)
        {
            flag=1;
            res+="@";
            i++;
        }
        else
            res+=str[i];
    }
    cout<<res<<endl;
}

#include<bits/stdc++.h>
using namespace std;
main() {

    string s;
    getline(cin, s);

    char flag = false;

    for (int i = 0; i < s.length(); ) {
        if (i + 3 < s.length() && i)
            if (s.substr(i, 3) == "dot") {
                printf(".");
                i += 3;
                continue;
            }
        if (i + 2 < s.length() && i && !flag)
            if (s.substr(i, 2) == "at") {
                printf("@");
                flag = true;
                i += 2;
                continue;
            }
        printf("%c", s[i++]);
    }

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main(){
	string s;
	cin>>s;
	if(s.find("at")!=string::npos){
		int a=s.find("at");
		s=s.substr(0,a)+"@"+s.substr(a+2);
	}
	if(s[0]=='@'){
		if(s.find("at")!=string::npos){
			int a=s.find("at");
			s=s.substr(0,a)+"@"+s.substr(a+2);
		}
		s="at"+s.substr(1);
	}
	while(s.find("dot")!=string::npos){
		int a=s.find("dot");
		s=s.substr(0,a)+'.'+s.substr(a+3);
	}
	if(s[0]=='.'){
		s="dot"+s.substr(1);
	}
	if(s[s.size()-1]=='.'){
		s=s.substr(0,s.size()-1)+"dot";
	}
	cout<<s<<endl;
	return 0;
}

#include <bits/stdc++.h>

#define pb push_back
#define mp make_pair
#define f first
#define s second
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define pi acos(-1.0)
#define EPS 1e-9
#define mem(n,x) memset(n,x,sizeof(n))
typedef long long ll;

using namespace std;

int main()
{
	string s;
	cin>>s;
	for(int i=1;i<s.size()-1;i++){
		if(s[i]=='a' && s[i+1]=='t'){s[i]='@';s.erase(i+1,1);break;}
	}
	for(int i=1;i<s.size()-2;i++){
		if(s[i]=='d' && s[i+1]=='o' && s[i+2]=='t'){
			if(i+2==s.size()-1)continue;
			s[i]='.';s.erase(i+1,2);
		}
	}
	cout<<s<<"\n";
	return 0;
}

#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main()
{
	bool at=1;
	vector<char> ans;
	char* mail=new char[100];
	cin>>mail;

	ans.push_back(mail[0]);
	for(unsigned int i=1;i<strlen(mail);i++)
	{
		if (at&&i<(strlen(mail)-2)&&mail[i]=='a'&&mail[i+1]=='t')
		{
			ans.push_back('@');
			++i;
			at=0;
		}
		else
			if (i<(strlen(mail)-3)&&mail[i]=='d'&&mail[i+1]=='o'&&mail[i+2]=='t')
			{
				ans.push_back('.');
				++i;
				++i;
			}
			else
			{
				ans.push_back(mail[i]);
			}
	}

	for(int i=0;i<ans.size();++i)
		cout<<ans[i];
	cout<<endl;

	return 0;
}

#include <stdio.h>
#include <conio.h>
#include<iostream>
#include <math.h>
#include <time.h>
#include <stdlib.h>
#include <string>
using namespace std;

#define ll long long
#define fo(x,y,z) for(int x=y;x<z;x++)

int main(void)
{
	string s;
	cin>>s;
	int l=s.find("dot");
	while (l!=-1)
	{
	s.erase(l,3);
	s.insert(l,".");
	l=s.find("dot");
	}
	if(s[0]=='.') {s.erase(0,1);s.insert(0,"dot");}
	if(s[s.size()-1]=='.') {s.erase(s.size()-1,1);s.insert(s.size(),"dot");}

	string* e=&s;
	cout<<s[0];
	s.erase(0,1);
	l=s.find("at");
	if(l!=-1)
	{
	s.erase(l,2);
	s.insert(l,"@");
	}
	cout<<s;

 return 0;

}

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int p,k;
int main()
{
	string a;
	cin>>a;
	p=1;
	k=a.find("at",p);
	a.replace(k,2,"@");
	k=a.find("dot",p);
	while(k!=a.npos && k!=a.size()-3)
	{
	    a.replace(k,3,".");
	    k=a.find("dot",p);
	}
	cout<<a;
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main() {
    string s;
    cin >> s;
    int i = s.find("at", 1);
    s.replace(i, 2, 1, '@');
    i = s.find("dot", 1);
    while (i != string::npos && s.size() - i > 3) {
        s.replace(i, 3, 1, '.');
        i = s.find("dot", 1);
    }
    cout << s << endl;
    return 0;
}

#include<iostream>
#include<algorithm>
#include<stdio.h>
#include<cstdio>
//防止UKE
using namespace std;
string s;
string t;
bool flag;
int main(){
    cin>>s;
    for(int i=0;i<s.size();){
        if(s[i]=='d'&&s[i+1]=='o'&&s[i+2]=='t'&&(i!=0&&i!=s.size()-3)){
            t+='.';
            i+=3;
        }
        else if(s[i]=='a'&&s[i+1]=='t'&&(i!=0&&i!=s.size()-2)&&!flag){
            t+='@';
            i+=2;
            flag=true;
        }
        else{
            t+=s[i];
            i++;
        }
    }
    cout<<t<<endl;
    return 0;
}

#include <stdio.h>
#include <string>
#include <iostream>
#include <vector>

using namespace std;

int main( void ) {
     string email;
     vector<string> opt = { "at", "dot" };

     cin >> email;

     /* look for the '@' */
     for( int i = 1; i < email.size()-1; i++ ) {
          int j;
          for( j = 0; j < opt[0].size(); j++ )
               if( email[i+j] != opt[0][j] ) break;

          if( j == opt[0].size() ) {
               email[i] = '@';
               email.erase(i+1, 1);
               break;
          }
     }

     /* look for the '.' */
     for( int i = 1; i < email.size()-3; i++ ) {
          int j;
          for( j = 0; j < opt[1].size(); j++ )
               if( email[i+j] != opt[1][j] ) break;

          if( j == opt[1].size() ) {
               email[i] = '.';
               email.erase(i+1, 2);
          }
     }

     cout << email << endl;

     return 0;
}

#include<bits/stdc++.h>
using namespace std;
string str;
string ans;
int n;
bool f=true;
int main(){
	cin>>str;
	n=str.length();
	int happy=19260817+19890604-20041023;
	for(int i=0;i<n;i++)if(str[i]=='a'&&str[i+1]=='t'&&f&&i!=0&&(i+1)!=n-1)putchar('@'),f=false,i+=1;else if(str[i]=='d'&&str[i+1]=='o'&&str[i+2]=='t'&&i!=0&&(i+2)!=n-1)putchar('.'),i+=2;else putchar(str[i]);
	return 0;
}

#include <iostream>
#include <string>

using namespace std;

int main ()
{
	string s;
	cin >> s;
	cout << s[0];
	bool at = false;
	for (int i = 1; i < s.length(); i++)
		if (i + 2 < s.length() && !at && s[i] == 'a' && s[i + 1] == 't')
		{
			at = true;
			cout << '@';
			i++;
		}
		else if (i + 2 < s.length() && s[i] == 'd' && s[i + 1] == 'o' && s[i + 2] == 't')
		{
			cout << '.';
			i += 2;
		}
		else
			cout << s[i];
	cout << endl;
	return 0;
}

 /** Writer: Sabuj Das **/

#include <bits/stdc++.h>
using namespace std;
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) (a * b) / gcd(a, b)
#define ll long long int
#define sabuj return 0
#define _max *max_element
#define _min *min_element
string s1, s2, s3;
string s;
int main ()
{
	//freoprn("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
    ll a[100001]={0},v, b[100001], c=0, d=0,e,f,g,h, i, j, k=0, l=0, m, n, p=0, q, t, ct = 0, ct1 = 0, ct2 = 0, ck = 0, ck1 = 0, ck2 = 0, ln, ln1, start, end, mid;
    ll a1 = 0,cnt=0, a2 = 0, a3 = 0, a4 = 0, sum = 0, sum1 = 0, max1, max2, min1, min2;
    double x, y, z;
    string jo,lo,ko;
    char  st[1001],  ch, ch1, ch2;
     cin>>s;
      n=s.size();
    for(i=0;i<n;i++){
    	if(s[i]=='a'&&s[i+1]=='t'&&c==0&&i>0){
    		cout<<"@";
    		i++;
    		c++;
		}
		else if(s[i]=='d'&&s[i+1]=='o'&&s[i+2]=='t'&&i>0){
			cout<<".";
			i=i+2;
		}
		else
		cout<<s[i];
	}
     return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define lli long long int
int main()
{
   string s;

   cin>>s;

   string res="";
   int flag = 0;
   for(int i=0;i<s.length();i++)
   {
        if(i<s.length() - 2 && s[i] =='d' && s[i+1] == 'o' && s[i+2] == 't')
        {
            res.append(1,'.');
            i+=2;
        }
        else if(i<s.length()-1 && s[i] == 'a' && s[i+1] == 't' && flag == 0)
        {
            res.append(1,'@');
            i++;
            flag = 1;
        }
        else
            res.append(1,s[i]);
   }
   //cout<<res<<"\n";
   //if(res[0] == '.') cout<<"dot";
   for(int i = 0;i<res.length();i++)
   {
        if( i == 0 && res[i] == '.')
            cout<<"dot";
        else if( i == 0 && res[i] == '@')
            cout<<"at";
        else if(i == res.length()-1 && res[i] == '.')
            cout<<"dot";
        else if( i == res.length()-1 && res[i] == '@')
            cout<<"at";
        else
            cout<<res[i];
   }

}

#include <iostream>

using namespace std;

string s;

int main (){
	cin >> s;
	for (int i = 1; i < s.length() - 1; i++){
		if (s.substr(i, 2) == "at"){
			s.erase(i, 2);
			s.insert(i, "@");
		}
		if (s.substr(i, 3) == "dot"){
			s.erase(i, 3);
			s.insert(i, ".");
		}
 	}

 	cout << s;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;

int main()
{
    int flag=0;
    string s;
    cin>>s;
    for(int i=0;i<s.length();++i)
    {
        if(i>0 && i<s.length()-2 && s.substr(i,3)=="dot")
        {

                cout<<".";
                i+=2;
                continue;
        }
        else if(i>0 && i<s.length()-1 && flag==0 && s.substr(i,2)=="at")
        {
                flag=1;
                cout<<"@";
                i++;
                continue;
        }
        else
            cout<<s[i];
    }
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    string a;
    cin>>a;
    int h=a.size();
    //a.erase(a.begin(), a.begin()+3);
    for(int i=0;i<h;i++)
    {
        if(a[i]=='d' && a[i+1]=='o' && a[i+2]=='t')
        {
            a[i]='.';
            a.erase(a.begin()+i+1,a.begin()+i+3);
        }
        if(a[i]=='a' && a[i+1]=='t')
        {
            a[i]='@';
            a.erase(a.begin()+i+1,a.begin()+i+2);
        }
    }
    h=a.size();
    for(int i=0;i<h;i++)
    {
        if(i==0 && a[i]=='.')
        {
            cout<<"dot";
            continue;
        }
        if(i==0 && a[i]=='@')
        {
            cout<<"at";
            continue;
        }
        if(i==h-1 && a[i]=='.')
        {
            cout<<"dot";
            continue;
        }
        if(i==h-1 && a[i]=='@')
        {
            cout<<"at";
            continue;
        }
        cout<<a[i];
    }
    return 0;
}

# include <iostream>
using namespace std;
int main(){
  string str,ans,a,b;
  cin>>str;
  int n, i,v;
  n=str.length();
  v=0;
  for(i=0;i<n;){
    a=str.substr(i,2);
    //cout<<a<<" ";
    b=str.substr(i,3);
   // cout<<b<<endl;
    if(a.compare("at")==0 && v==0){
      if(ans.length()==0 || i==n-2){
        ans=ans+a;
        i=i+2;
      }
      else{
        ans=ans+"@";
        i=i+2;
      }
      v=1;
    }
    else
    if(b.compare("dot")==0){
      if(ans.length()==0 || i==n-3){
        ans=ans+b;
        i=i+3;
      }
      else{
        ans=ans+".";
        i=i+3;
      }
    }
    else{
      ans=ans+str[i];
      i++;
    }
   // cout<<ans<<"\n";
  }
  cout<<ans;
  return 0;
}

//------------
//----lost----
//------------

#include <iostream>
#include <ctime>
#include <vector>
#include <list>
#include <queue>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <climits>
using namespace std;

typedef long long  int64;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> ii;
typedef string ST;
typedef stringstream SS;

#define 				  Pf	printf
#define				  Sf	scanf
#define			CL(a, b)	memset(a, b, sizeof(a))
#define				SZ(a)	int((a).size())
#define				  pb	push_back
#define			  all(c)	(c).begin(), (c).end()
#define			tr(i, c)	for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define	 present(x, c)	((c).find(x) != (c).end())                      // used for map and set. //
#define	cpresent(x, c)	(find(all(c),x) != (c).end())           // used for others like vector, list //
#define		 forn(i, n)	for(int i = 0; i < n; i++)
#define  forab(i, a, b)	for(int i = a; i <= b; i++)
#define	  rep(i, a, b)	for(int i = a; i>=b; i--)

int main()
{
  ST s, ans = "", ret = "";
  int i, l;

  cin >> s;

  l= s.length();

  i = 0;

  while(i < l)
  {
	 if(i !=0 && i != l-3 &&  s.substr(i, 3) == "dot")
	 {
		ans += ".";
		i += 3;
	 }
	 else
	 {
		ans += s[i];
		i++;
	 }
  }

  //cout << ans << endl;

  bool f = false;
  /*
  l = ans.length() ;

  ret = ans.substr(l-2);

  i = l-3;

  while(i > 0)
  {
	 if(f == false && ans.substr(i, 2) == "at")
	 {
		ret = ret.substr(1);
		ret = "@" + ret;
		f = true;
		i--;
	 }
	 else
	 {
		ret = ans[i] + ret;
		i--;
	 }

  }

  ret = ans[0] + ret;
  */

  ret = ans[0];

  i = 1;

  while(i  <= l-3)
  {
	 if(f == false && ans.substr(i, 2) == "at"){
		ret = ret + "@";
		i+=2;
		f = true;
	 }
	 else
	 {
		ret += ans[i];
		i++;
	 }
  }

  //ret +=

  cout << ret << endl;

  return 0;
}

#include<bits/stdc++.h>

#define ll long long
#define pb push_back
#define pp pop_back
#define fr freopen
#define fi first
#define se second
using namespace std;
ll i , j , k , m , n , c[3000] , d , e , l , r;
string a , b;
int main()
{
    ///freopen("gcm.in" , "r" , stdin);
    ///freopen("gcm.out" , "w" , stdout);
    ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
    cin>>a;
    n = a.length() - 1;
    for (i = n ; i >= 0; i --)
    {
        if (a[i] == 't' && a[i - 1] == 'o' && a[i - 2] == 'd' && i > 2 && i < n)
            b = '.' + b , i -= 2;
        else if (k == 0 && a[i] == 't' && a[i - 1] == 'a')
            k = 1 , b = '@' + b , i --;
        else
            b = a[i] + b;
    }
    cout<<b;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
int main()
{
    string str;
    cin>>str;
    int n=str.size();
    vector <char> vec;
    vec.pb(str[0]);
    bool ok=true;
    for(int i=1;i<n;i++)
    {
        if(str[i]=='d')
        {
            if(str[i+1]=='o'&&str[i+2]=='t')
            {
                vec.pb('.');
                 i=i+2;
            }
            else
                vec.pb(str[i]);
        }
        else if(str[i]=='a')
        {
            if(ok==false)
            {
                vec.pb(str[i]);
                continue;
            }
            if(str[i+1]=='t')
            {
                ok=false;
                vec.pb('@');
                i++;
            }
            else
            {
                vec.pb(str[i]);
            }
        }
        else
            vec.pb(str[i]);
    }
    for(int i=0;i<vec.size();i++)
    {
        cout<<vec[i];
    }

}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    ios_base::sync_with_stdio(0);
	string s;
	cin>>s;
	ll found=s.find("at");

     if (found!=std::string::npos)
	{
	    s.replace(found,2,"@");

	}

	int i=0;

	while(i<s.size()-4)
    {

       ll found1=s.find("dot");

       // found1=s.find("dot");

        if(found1!=0)
        {
            if (found1 !=std::string::npos)
            {

                s.replace(found1,3,".");

            }

        }
        else
        {
           if (found1 !=std::string::npos)
            {

                s.replace(found1,3,"DOT");

            }
        }

i=found1;
    }
    transform(s.begin(),s.end(),s.begin(),::tolower);

    cout<<s<<endl;

return 0;
}

  #include <iostream>
#include <string>
#include <vector>
using namespace std;
vector<int> a, d;
int cnt=0;
void preKMP(string pattern, int f[]) {
    int m = pattern.length(), k = 0;
    f[0] = 0;
    int i = 1;
    while (i < m) {
        if (pattern[i] == pattern[k]){
            f[i] = k + 1;
            k++;
            i++;
        }
        else {
            if (k != 0)
                k = f[k - 1];
            else{
                f[i] = 0;
                i++;
            }
        }
    }
}
void KMP(string pattern, string target) {
    int m = pattern.length(); int n = target.length(); int f[m];
    preKMP(pattern, f);
    int i = 0; int k = 0;
    while (i < n){
        if (target[i] == pattern[k]) {
            i++; k++;
        }
        if (k == m) {
            if(cnt==0)
            d.push_back(i-k);
            if(cnt==1)
            a.push_back(i-k);
            k = f[k - 1];
        }
        else if (i<n && pattern[k] != target[i]){
            if (k != 0)
                k = f[k - 1];
            else
                i++;
        }
    }
}

int main() {
    //freopen("checkin.txt", "r", stdin);
    //freopen("checkout.txt", "w", stdout);
    string str; cin >> str;
    const int N = str.size();
    KMP("dot", str); cnt++; KMP("at", str);
    for (int i = 0; i < d.size(); ++i) {
        if(d[i]!=0 && d[i]!=N-3)
            str[d[i]] = '`';
    }
    for (int i = 0; i < a.size(); ++i) {
        if(a[i] !=0 && a[i] != N-2)
        str[a[i]] = '~';
    }
    string res="";

    for (int i = 0; i < N; ++i) {
        if(str[i]=='`' && i != 0 && i!=N-3) {
            res+='.';
            i+=2;
        }
        else if (str[i] == '~' && i!=0 && i!=N-2) {
            res+='@';
            i+=1;
        }
        else res+=str[i];
    }
    cout << res;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
string s, S;
int main ()
{
    #ifndef ONLINE_JUDGE
		freopen (".in", "r", stdin);
    #endif
    cin >> s;
    int i = 1;
    S += s[0];
    while (i < s.size())
    {
    	if (s[i] == 'a' && s[i + 1] == 't')
    		i += 2, S += '@';
    	else if (s[i] == 'd' && s[i + 1] == 'o' && s[i + 2] == 't')
    		i += 3, S += '.';
    	else
    		S += s[i], i ++;
    }
    for (int i = 0; i < S.size(); ++ i)
    {
    	if (i == S.size() - 1)
    	{
    		if (S[i] == '.')
    			cout << "dot";
    		else if (S[i] == '@')
    			cout << "at";
    		else
    			cout << S[i];
    	}
    	else
    		cout << S[i];
    }
	return 0;
}

#include <iostream>

using namespace std;

int main()
{
        string s; cin >> s;
        int n = s.size();
        int i = 0;
        bool _at = true, _dot = true;
        while (i<n)
        {
                if (s[i]=='a' && s[i+1]=='t' && _at)
                {
                        cout << "@";
                        i+=2;
                        _at = false;
                        continue;
                }
                if (s[i]=='d' && s[i+1]=='o' && s[i+2]=='t' && i!=0 && i+2!=n-1)
                {
                        cout << ".";
                        i+=3;
                        continue;
                }
                else
                {
                        cout << s[i];
                        i++;
                }
        }
        return 0;
}

#include<cmath>
#include<math.h>
#include<ctype.h>
#include<algorithm>
#include<bitset>
#include<cassert>
#include<cctype>
#include<cerrno>
#include<cfloat>
#include<ciso646>
#include<climits>
#include<clocale>
#include<complex>
#include<csetjmp>
#include<csignal>
#include<cstdarg>
#include<cstddef>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<cwchar>
#include<cwctype>
#include<deque>
#include<exception>
#include<fstream>
#include<functional>
#include<iomanip>
#include<ios>
#include<iosfwd>
#include<iostream>
#include<istream>
#include<iterator>
#include<limits>
#include<list>
#include<locale>
#include<map>
#include<memory>
#include<new>
#include<numeric>
#include<ostream>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<stdexcept>
#include<streambuf>
#include<string>
#include<typeinfo>
#include<utility>
#include<valarray>
#include<vector>
#include<string.h>
#include<stdlib.h>
#include<stdio.h>
#define ll   long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define MAX 100000000000000000
#define MOD 1000000007
#define files  freopen("OUTPUT.TXT","r",stdin);
#define PI 3.141592653589793238462
#define INF 1000000000
using namespace std;
int my_find(string s1,string s2,int start){
	for (int i=start;i<s1.size();i++){
		if (s1[i]==s2[0]){
			bool f=1;
			for (int j=i+1;j<i+s2.size();j++){
				if (s2[j-i]!=s1[j]) f=0;
			}
			if (f) return i;
		}
	}
	return -1;
}
int main(){
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	string s1,s2,ans;
	bool findat=0;
	int pos;
	cin>>s1;
	pos=my_find(s1,"at",0);
	s2=s1.substr(0,pos)+'@'+s1.substr(pos+2);
	int i=my_find(s2,"dot",1),last=0;
	while(i!=-1&&i<s2.size()-3){
		ans+=s2.substr(last,i-last)+".";
		last=i+3;
		i=my_find(s2,"dot",last);
	}
	ans+=s2.substr(last);
	cout<<ans;
	return 0;
}

#include <iostream>

using namespace std;

string s;

int main (){
	cin >> s;
	for (int i = 1; i < s.length() - 2; i++){
		if (s.substr(i, 2) == "at"){
			s.erase(i, 2);
			s.insert(i, "@");
		}
		if (s.substr(i, 3) == "dot"){
			s.erase(i, 3);
			s.insert(i, ".");
		}
 	}

 	cout << s;
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

string dt = "dot";
string at1 = "at";

inline bool if_dot(string s, int i)
{
    if (i > s.size() - 3)
    {
        return false;
    }
    for (int j = i; j < i + 3; j++)
    {
        if (s[j] != dt[j - i])
        {
            return false;
        }
    }
    return true;
}

inline bool if_at(string s, int i)
{
    if (i > s.size() - 2)
    {
        return false;
    }
    for (int j = i; j < i + 2; j++)
    {
        if (s[j] != at1[j - i])
        {
            return false;
        }
    }
    return true;
}

int main()
{
    string s;
    cin >> s;
    int i = 0;
    string ans = "";
    bool ch = true;
    while (i < (int)s.size())
    {
        if (i == 0 or i == (int)s.size() - 1)
        {
            ans += s[i];
            i++;
            continue;
        }
        if (if_dot(s, i))
        {
            ans += ".";
            i += 3;
        }
        else if (ch and if_at(s, i))
        {
            ch = false;
            ans += "@";
            i += 2;
        }
        else
        {
            ans += s[i];
            i++;
        }
    }
    cout << ans;
}

#include <map>
#include <set>
#include <deque>
#include <string>
#include <vector>
#include <utility>
#include <algorithm>

#include <math.h>
#include <stdlib.h>

#include <stdio.h>
#include <iomanip>
#include <iostream>

#define im 2000000000
#define sim -2000000000
#define lim 9000000000000000000
#define slim -9000000000000000000

#define sf(n) for(size_t i=0; i < n; i++)
#define df(n, m) for(size_t i=0; i < n; i++) for(size_t j=0; j < m; j++)

//typedef vector <int> vi;
//typedef vector < vector <int> > vvi;

using namespace std;

int main()
{
	string str;
	cin >> str;
	bool at = true;
	if(str.find("at"))
	while(str.find("at") != string::npos)
	{
		int pos = str.find("at");
		if(pos != str.length() - 2 && at)
		{
		at = false;
		str.erase(pos, 2);
		str.insert(pos, "@");
		}
		else
			break;
	}
	else
	while(str.substr(1).find("at") != string::npos)
	{
		int pos = str.substr(1).find("at");
		if(pos != str.length() - 2 && at)
		{
		at = false;
		str.erase(pos+1, 2);
		str.insert(pos+1, "@");
		}
		else
			break;
	}
	if(str.find("dot"))
	while(str.find("dot") != string::npos)
	{
		int pos = str.find("dot");
		if(pos != str.length() - 3)
		{
		str.erase(pos, 3);
		str.insert(pos, ".");
		}
		else
			break;
	}
	else
	while(str.substr(1).find("dot") != string::npos)
	{
		int pos = str.substr(1).find("dot");
		if(pos != str.length() - 3)
		{
		str.erase(pos+1, 3);
		str.insert(pos+1, ".");
		}
		else
			break;
	}
	cout << str << endl;
	//system("pause");
	return 0;
}

#include <bits\stdc++.h>
using namespace std;
#define rep(flag,a,b) for(int flag=(a);flag<=b;flag++)
#define Rep(flag,a,b) for(int flag=(a);flag>=b;flag--)
#define mem(flag) memset(flag,0,sizeof(flag))
#define Mem(flag) memset(flag,-1,sizeof(flag))
#define read(a) a=getInt()
#define En printf("\n")
#define P(a) printf("%d ",a)
#define Pn(a) printf("%d\n",a)
#define dbg(x) cout << (#x) << " = " << (x) << endl
#define W(a) while(a)
#define lowbit(x) (x&-x)
#define F .first
#define S .second
#define inf 0x3f3f3f3f
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pi;
typedef pair<double,double> pd;
typedef vector<pi> vpi;
typedef vector<pd> vpd;
const int MAX=12;
const int eps=1e-9;
inline const int getInt()  {
	int res=0,ch,flag=0;
    if((ch=getchar())=='-')
        flag=1;
    else if(ch>='0'&&ch<='9')
        res=ch-'0';
    while((ch=getchar())>='0'&&ch<='9')
        res=res*10+ch-'0';
    return flag?-res:res;
}
inline void printInt(int a) {
    if(a>9)
        printInt(a/10);
    putchar(a%10+'0');
}

#define DEBUG

char buf[200];
void sol() {
    int len=strlen(buf);
    int i=0; bool at=false;
    while(i<=len-1) {
        if(i==0||i==len-2||i==len-3) {
            if(!at&&i==len-3&&buf[i]=='a'&&buf[i+1]=='t') {
                printf("@"); i+=2; at=true;
            } else {
                printf("%c",buf[i]); i++;
            }
        } else {
            if(buf[i]=='a'&&!at) {
                if(i+1<=len-1&&buf[i+1]=='t') {
                    printf("@"); i+=2; at=true;
                } else {
                    printf("%c",buf[i]); i++;
                }
            } else if(buf[i]=='d') {
                if(i+2<=len-1&&buf[i+1]=='o'&&buf[i+2]=='t') {
                    printf("."); i+=3;
                } else {
                    printf("%c",buf[i]); i++;
                }
            } else {
                printf("%c",buf[i]); i++;
            }
        }
    }
}

int main() {
    #ifdef DEBUG
    //freopen("./input.txt","r",stdin);
    //freopen("./output.txt","w",stdout);
    int cases=1;
    while(cases--) {
    #endif
        printf("%d %d\n",'@','a');
        scanf("%s",buf);
        sol();
    #ifdef DEBUG
    }
    #endif
    return 0;
}

#include <iostream>
using namespace std;

char s[101];

int main()
{
    gets(s);
    int n = strlen(s);
    bool flag = false;
    for (int i = 0; i < n;)
    {
        if (i < n - 4 && i && !strncmp(s + i, "dot", 3))
            putchar('.'), i += 3;
        else if (!flag && i < n - 2 && !strncmp(s + i, "at", 2))
            putchar('@'), i += 2, flag = true;
        else putchar(s[i++]);
    }
    return 0;
}

#include<iostream>
#include<string>
#include<vector>
using namespace std;
typedef long long int LL;

int main()
{
    vector<char>A;
    string s;
    cin>>s;
    bool at=false;
    for(int i=0;i<s.size();i++)
    {
        if(i>0 && s[i]=='d' && s[i+1]=='o' && s[i+2]=='t')
        {
            A.push_back('.'),i+=2;
            continue;
        }
        if(s[i]=='a' && s[i+1]=='t' && !at)
            A.push_back('@'),at=true,i++;
        else
            A.push_back(s[i]);
    }
    for(int i=0;i<A.size();i++)
        cout<<A[i];
    return 0;
}

/**
   _           _
  / /         \ \
 / /  _   _  _ \ \
< < (_) (_) (_) > >
 \ \           / /
  \_\         /_/

    Nerede Gitsen Çukur Orda
**/

#include<bits/stdc++.h>
#include<fstream>
///#include<conio.h>
///#include "windows.h"
#define ll long long
#define ld long double
#define pb push_back
#define pf push_front
#define fr first
#define sc second
#define Zohiri_dzd cout.tie(NULL);
#define Belafz cin.tie(NULL);
#define CODER ios_base::sync_with_stdio(0)  ;
#define p_b pop_back
#define p_f pop_front
#define quluq return 0;
using namespace std ;

    const ll N = 1e9 ;

int main ()
{
    Zohiri_dzd
    Belafz
    CODER
    ///freopen("input.txt" , "r" , stdin );
    ///freopen("output.txt", "w" , stdout );
    ///429496729
    string g ;
    cin >> g ;
    for (ll i = 1 ; i < g.size() - 2 ; i ++ )
    {
        if (g[i] == 'a' and g[i + 1] == 't')
        {
            g[i] = '@' ;
            g.erase(g.begin() + i + 1) ;
            break ;
        }
    }
    for (ll i = 1 ; i < g.size() - 2 ; i ++ )
    {
        if (g[i] == 'd' and g[i + 1] == 'o' and g[i + 2] == 't')
        {
            g[i] = '.' ;
            g.erase(g.begin() + i + 1) ;
            g.erase(g.begin() + i + 1) ;
            i = 0 ;
        }
    }
    cout << g ;
}
///MaaN studios
///Eco students

/* created   : 2019-08-18 15:24:20
 * accepted  : 2019-08-18 15:41:51
 * author    : landcold7
 */
#include <bits/stdc++.h>
using namespace std;
#define x first
#define y second
#ifndef LOCAL
#define trace(...)
#endif
typedef long long ll;

void solve() {
  string s;
  cin >> s;
  int p = s.find("at");
  string ans = string('a', 120);
  while (p != -1) {
    string x = s;
    string cur;
    int n = x.size();
    for (int i = 0; i < n; i++) {
      if (i && i != n - 3 && i + 3 <= n && x.substr(i, 3) == "dot") {
        cur += ".";
        i += 2;
      }
      else if (i && i != n - 2 && i == p) {
        cur += "@";
        i++;
      }
      else {
        cur += x[i];
      }
    }
    if (cur.size() < ans.size() && cur < ans) {
      ans = cur;
    }
    trace(p, cur);
    p = s.find("at", p + 2);
  }
  cout << ans << '\n';
}

int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  solve();
  return 0;
}

#include <iostream>
#include <string>
#include <stdio.h>
using namespace std;
string str ;
char arr[10001] ;
int main()
{
    int i , j = 0 , f = 0 ;
    cin>>str;

    for ( i = 1 ; i < str.length() ; i ++ )
    {
        j++;
        if ( str.substr(i,2) == "at" && f == 0 )
        {
            if ( i >= str.length()-2 )
            {
                arr[j]=str[i] ;
            }
            else
            {
            arr[j] = '@' ;
            f = 1 ;
            i++;
            }
        }
        else if ( str.substr(i,3) == "dot" )
        {
             if ( i >= str.length()-3 )
            {
                arr[j]=str[i] ;
            }
            else
            {
            arr[j] = '.' ;
            i+=2;
            }
        }
        else if ( str.substr(i,3) != "dot" && str.substr(i,2) != "at" )
        {
            arr[j]=str[i] ;

        }
    }
    printf("%c",str[0]);
    for( i = 1 ; arr[i] != '\0' ; i ++ ) printf("%c",arr[i]);

    return 0;
}

#include <bits/stdc++.h>

#define ll long long
#define ull unsigned long long
#define all(v)  v.begin() , v.end()
#define rall(v)  v.rbegin() , v.rend()
#define FOR(it,A) for(typeof A.begin() it = A.begin(); it!=A.end(); it++)
#define REP(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define vi vector<int>
#define vll vector<ll>
#define vull vector<ull>
#define vvi vector< vector<int> >
#define pii pair< int , int >
#define pll pair< ll , ll >
#define mp make_pair
#define fi first
#define se second
#define sc(x) scanf("%d",&x)
#define me(t,val) memset( t , val , sizeof(t) )
#define ones(x) __builtin_popcount(x)
#define test puts("test");
#define sync ios_base::sync_with_stdio(false);

#define N 100005
#define MOD 1000000007
#define INF (1<<30)
#define EPS (1e-5)

using namespace std;

int main()
{
	sync
	string s;
	while( cin >> s )
	{
		int ns = s.size();
		string temp;
		REP( i , ns )
		{
			if( i > 0 &&  i + 3 < ns && s.substr(i,3) == "dot" )
				temp += ".",i+=2;
			else if( i > 0 &&  i + 2 < ns && s.substr(i,2) == "at" )
				temp += "@",i++;
			else temp+=s[i];
		}
		cout << temp << endl;
	}
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
	string a;
	cin>>a;
	vector <long long int> v,v1;
	for(long long int i=0;i<a.length()-1;++i)
	{
		if(a[i]=='a' && a[i+1]=='t')
		{
			v.push_back(i);
		}
	}
	for(long long int i=0;i<a.length()-2;++i)
	{
		if(a[i]=='d' && a[i+1]=='o' && a[i+2]=='t')
		{
			v1.push_back(i);
		}
	}
	long long int j=0;
	for(long long int i=0;i<a.length();++i)
	{
		if(v1.size()!=0 && i==v1[j])
		{
			if(i!=0)
			{
				cout<<".";
				++j;
				i+=2;
			}
			else
			{
				cout<<a[i];
				++j;
			}
		}
		else if(i==v[0] && i!=0)
		{
			cout<<"@";
			++i;
		}
		else
		{
			cout<<a[i];
		}
	}
}

#include <math.h>
#include <iostream>
#include <map>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
	string s;
	cin >> s;
	bool atiscome = false;
	for (int i = 0; i < s.size(); i++){
		if (i > 0 && i < s.size() - 2){
			if (i < s.size() - 1 && s.substr(i, 3) == "dot"){
				cout << '.';
				i += 2;
			}
			else if (i < s.size() - 2 && s.substr(i, 2) == "at" && !atiscome){
				cout << '@';
				i ++;
				atiscome = true;
			}
			else
				cout << s[i];
		}
		else
			cout << s[i];
	}
	cout << endl;
}

#include <bits/stdc++.h>
using namespace std ;

typedef long long ll ;
typedef long double ld ;
#define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

const ll MOD = 1e9 + 7 ;
const double PI = 2 * acos(0.0) ;
const long double EPS = 1.0E-14 ;

int main()
{
    string s, ans = "" ;
    ll atFlag = 0 ;
    cin >> s ;
    ans += s[0] ;
    for (int i = 1; i < s.size(); i++) {
        if (s[i] == 'd' and s[i + 1] == 'o' and s[i + 2] == 't') {
            ans += '.' ;
            i += 2 ;
        }
        else if (!atFlag and s[i] == 'a' and s[i + 1] == 't') {
            ans += '@' ;
            atFlag = 1 ;
            i += 1 ;
        }
        else {
            ans += s[i] ;
        }
    }
    cout << ans ;

    return 0 ;
}

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int f=0;
    string s;
    cin>>s;
    for(int i=1; i<s.size(); i++)
    {
        if(!f)
        {
            if(s[i]=='a'&&s[i+1]=='t')
            {
                s.erase(s.begin()+i,s.begin()+i+1);
                s[i]='@';
                f=1;
            }
        }
        if(s[i]=='d'&&s[i+1]=='o'&&s[i+2]=='t')
        {
            s.erase(s.begin()+i,s.begin()+i+2);
            s[i]='.';
        }
    }
    cout<<s<<endl;
}

#include <bits/stdc++.h>

using namespace std;

int main() {

	string z;
	cin >> z;
	string a = "dot", b = "at";
	vector<int> v;
	vector<int> ca;
	int s = -1;
	vector<char> k(z.size(), 0);
	for (int i = 0; i < z.size() - 2; i++) {
		string temp;
		temp += z[i];
		temp += z[i + 1];
		temp += z[i + 2];
		if (temp == a && i > 0 && i + 2 != z.size()) {
			v.push_back(i);
			i += 2;
		} else {
			k[i] = z[i];
		}
	}
	if (v.size() != 0) {
		int t = v[v.size() - 1] + 3;
		int h = 2;
		h = z.size() - t;
		for (int i = z.size() - h; i < z.size(); i++)
			k[i] = z[i];
	}
	for (int i = 0; i < z.size() - 1; i++) {
		string temp;
		temp += z[i];
		temp += z[i + 1];
		if (temp == b && i > 0) {
			if (s == -1) {
				s = i;
				k[i + 1] = 0;
			}
		}
		if (v.size() == 0) {
			if (s != -1 && i != s + 1)
				k[i] = z[i];

		}
	}
	if (v.size() == 0) {
		k[z.size() - 1] = z[z.size() - 1];
	}
	for (int i = 0; i < v.size(); i++) {
		k[v[i]] = '.';
	}
	k[s] = '@';
	string res;
	for (int i = 0; i < k.size(); i++) {
		//	cout << k[i];
		if (k[i])
			res += k[i];
	}
	cout << res << endl;

}

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define light ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr)
#define ll long long
#define ld long double
#define endl "\n"
#define p0(a) cout << a << " "
#define p1(a) cout << a << endl
#define vi vector<int>
#define pii pair<int,int>
#define pb push_back
#define F first
#define S second
#define lb lower_bound
#define ub upper_bound
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define REP(i,a,b) for(ll i = a; i < b; i++)
#define REPE(i,a,b) for(ll i = a; i <= b; i++)
#define REPR(i,a,b) for(ll i = a; i >= b; i--)
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) (a * b) / gcd(a, b)
#define bins(v, x) binary_search(v.begin(), v.end(), x)
const double pi = 2*acos(0.0);
const int INF = 1e9+1;
const int mod = 1e9+7;
const int mod1 = 998244353;

ll modExp(ll base, ll exp, ll mod) {
   ll res = 1;
   while (exp > 0) {
    	if (exp % 2 == 1) {
        	res= (res * base) % mod;
		}
      exp = exp >> 1;
      base = (base * base) % mod;
   }
   return res;
}

ll inverse(ll base, ll exp, ll mod) {
   return modExp(base, exp - 2, mod);
}

bool compare(const pair<int, int>&i, const pair<int, int>&j) {
   return (i.S > j.S || (i.S == j.S && i.F > j.F));
}

void test() {
   string s;
   cin >> s;
   int n = s.size();
   for(int i = 1; i < n; i++) {
      if(s.substr(i,2) == "at") {
         s[i] = '@';
         s[i+1] = '#';
         break;
      }
   }

   for(int i = 1; i < n; i++) {
      if(s[i] != '@' && s[i] != '#') {
         s[i] = '.';
      }
   }

   for(int i = 0; i < n; i++) {
      if(s[i] == '#') {
         continue;
      } else {
         cout << s[i];
      }
   }
}

int main() {
   //freopen("input.txt","r",stdin);
   //freopen("output.txt","w",stdout);
   light;
   cout.precision(15);
   cout << fixed;

   int t = 1;
   //cin >> t;
   while(t--) {
      test();
   }
   return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main(){
	string s, newS;
	bool dotLast=false, atLast=false;
	cin >> s;

	if(s.find("at")==0)
	{
		newS+="at";
		s.replace(0, s.find("at")+2, "");
	}
	else if(s.find("dot")==0)
	{
		newS+="dot";
		s.replace(0, s.find("dot")+3, "");
	}
	if(s.rfind("at")==s.length()-2)
	{
		atLast=true;
		s.replace(s.length()-2, 2, "");
	}
	else if(s.rfind("dot")==s.length()-3)
	{
		dotLast=true;
		s.replace(s.length()-3, 3, "");
	}

	while(s.find("at")<s.length() || s.find("dot")<s.length())
	{
		if(s.find("at")>s.find("dot"))
		{
			newS += s.substr(0, s.find("dot")) + ".";
			s.replace(0, s.find("dot")+3, "");
		}
		else
		{
			newS += s.substr(0, s.find("at")) + "@";
			s.replace(0, s.find("at")+2, "");
		}
	}
	if(dotLast) newS+="dot"; else if(atLast) newS+="at"; else newS+=s;
	cout << newS;
}

#include<iostream>
#include<string>
#include<cstdio>
using namespace std;
int main(){
    string s;cin>>s;
    string ans;ans+=s[0];
    string e=s.substr(s.size()-3,3);

    int k=0;
    if(e!="dot")
    {
    for(int i=1;i<s.size();i++)
    {
        string h=s.substr(i,3);
        string f=s.substr(i,2);
        if(h=="dot")
        {
            i+=2;
            ans+=char('.');
        }
        else if(f=="at"&&k==0)
        {
            k=1;
            i+=1;
            ans+=char('@');
        }
        else
            ans+=s[i];
    }
    }
    else
    {
        for(int i=1;i<s.size()-1;i++)
    {
        string h=s.substr(i,3);
        string f=s.substr(i,2);
        if(h=="dot")
        {
            i+=2;
            ans+=char('.');
        }
        else if(f=="at"&&k==0)
        {
            k=1;
            i+=1;
            ans+=char('@');
        }
        else
            ans+=s[i];
    }
    }

    cout<<ans;

}

#include<iostream>
#include<string>
using namespace std;
int main(){
string a;
cin>>a;
cout<<a[0];
bool is=false;
for(int i=1; i<a.size(); i++){
    is=false;
    if(a[i]=='d' && a[i+1]=='o' && a[i+2]=='t' && i<a.size()-3){
        cout<<".";
        i+=2;
        is=true;
    }
    if(a[i]=='a' && a[i+1]=='t' && i<a.size()-2){
        cout<<"@";
        i+=1;
        is=true;
    }
    if(!is)
        cout<<a[i];
}
return 0;
}

#include <iostream>
#include <string>
using namespace std;

int main()
{
	string str;
	cin >> str;
	int dot = 0;
	int at = 0;
	for (int i = 0;i < str.size();i++)
	{
		if (str[i] == 'd' && str[i + 1] == 'o' && str[i + 2] == 't')
		{
			dot++;
		}
		if (str[i] == 'a' && str[i + 1] == 't')
		{
			at++;
		}
	}
	for (int i = 0;i < str.size();i++)
	{
		if (str[i] == 'd' && str[i + 1] == 'o' && str[i + 2] == 't' && (dot==false || dot==1))
		{
			cout << ".";
			i += 2;
			continue;
		}
		else if(str[i] == 'd' && str[i + 1] == 'o' && str[i + 2] == 't' && dot >1)
		{
			cout << "dot";
			i += 2;
			dot = 0;
			continue;
		}
		if (str[i] == 'a' && str[i + 1] == 't' && at>=1)
		{
			cout << "@";
			i += 1;
			at = 0;
			continue;
		}
		else if (str[i] == 'a' && str[i + 1] == 't' && at==0)
		{
			cout << "at";
			i += 1;
			continue;
		}
		cout << str[i];
	}
    return 0;
}

//IN THE NAME OF GOD
/*
ID: iman.ho1
LANG: C++
PROG: ?
*/
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <cstdio>
#include <fstream>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <list>
#include <ctime>

#define pb push_back
#define eror(x)  cerr << #x << " = " << x << endl
#define buge(s)  cerr << (s) << endl
#define all(a)   (a).begin(), (a).end()
#define Size(a)  ((int)(a).size())

using namespace std;

/**
ifstream fin("?.in");
ofstream fout("?.out");
#define cin fin
#define cout fout
/**/

typedef int itn;

string s;

int main()
{
    ios::sync_with_stdio(false);
    cin >> s;
    int l = s.size(), k, t;
    for(int i=0; i<l; i++)
    {
        k = 0;
        if(s[i] == 'd' && i < l-2 && i != 0 && s[i + 1] == 'o'&& s[i + 2] =='t')
        {
            cout << '.';
            k++;    i += 2;
        }
        if( t == 0 && s[i] == 'a' && i < l - 1 && s[i + 1] == 't')
        {
            k++;    i++; t++;
            cout << '@';
        }
        if(k == 0)  cout << s[i];
    }
    return 0;
}

#include <bits/stdc++.h>
#define int long long
#define mp make_pair
#define pb push_back
#define ss second
#define ff first
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define rep(i,A,B) for(int i=A;i<=B;i++)
#define mod 1000000007
#define v1d vector<int>
#define v2d vector<vector<int> >
#define endl "\n"

int32_t main(){
    int n=0;
    //cin>>n;
    string s;
    cin>>s;
    int l=s.length();
    string p= s+"--";
    vector<char> v;
    for(int i=0; i<l; i++){
        if(p[i]=='d' && i){
            if(p[i+1]=='o'&&p[i+2]=='t'){
                v.pb('.');
                i+=2;
                continue;
            }
        }
        if(p[i]=='a' && p[i+1]=='t'){
            if(n){
                v.pb(p[i]);
                v.pb(p[i+1]);
                i+=1;
                continue;
            }
            n++;
            v.pb('@');
            i++;
            continue;
        }
        v.pb(p[i]);
    }
    for(char i: v){
        cout<<i;
    }

    return 0;
}

#define _CRT_SECURE_NO_DEPRECATE
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <stdlib.h>
#include <ctime>
#include <set>
#include <map>
#include <queue>
#include <string>
#include <math.h>
//#include <complex>
#include <memory.h>
#include <iostream>

using namespace std;

void ASS(bool b) {if (!b) ++*(int*)0;}

#define FOR(i, x) for (int i = 0; i < (int)(x); i++)
#define CL(x) memset(x, 0, sizeof(x))

#pragma comment(linker, "/STACK:106777216")

typedef vector<int> vi;
typedef long long LL;

string Concat(string a, string b)
{
	if (a.size() && a[0] == '*') return "*";
	if (b.size() && b[0] == '*') return "*";
	return a + b;
}

string Best(string a, string b)
{
	if (a.size() && a[0] == '*') return b;
	if (b.size() && b[0] == '*') return a;
	if (a.size() < b.size()) return a;
	if (b.size() < a.size()) return b;
	if (a < b)
		return a;
	else
		return b;
}

string s;

char f[128][128][2][2][2];
string d[128][128][2][2][2];

string D(int L, int R, int can0, int can1, int at)
{
	if (f[L][R][can0][can1][at])
		return d[L][R][can0][can1][at];
	f[L][R][can0][can1][at] = 1;
	string &res = d[L][R][can0][can1][at];
	res = "*";
	if (R - L == 0)
	{
		if (at)
			return res;
		res = "";
		return res;
	}
	if (R - L == 1)
	{
		if (at)
			return res;
		res = "";
		res += s[L];
		return res;
	}
	if (at)
	{
		for (int i = L; i + 2 <= R; i++)
			if (s[i] == 'a' && s[i + 1] == 't')
			{
				if (i == L && !can0) continue;
				if (i + 2 == R && !can1) continue;
				res = Best(res, Concat(Concat(D(L, i, can0, 1, 0), "@"), D(i + 2, R, 1, can1, 0)));
			}
	}
	else
	{
		res = s.substr(L, R - L);
		for (int i = L; i + 3 <= R; i++)
			if (s[i] == 'd' && s[i + 1] == 'o' && s[i + 2] == 't')
			{
				if (i == L && !can0) continue;
				if (i + 2 == R && !can1) continue;
				res = Best(res, Concat(Concat(D(L, i, can0, 1, 0), "."), D(i + 3, R, 1, can1, 0)));
			}
	}
	return res;
}

int main()
{
	cin >> s;
	string res = D(0, s.size(), 0, 0, 1);
	printf("%s\n", res.c_str());
    return 0;
}

#include <iostream>
#include <string>
using namespace std;
string s,ans;
int main()
{
     cin>>s;
     int leng=s.size();
     for (int i=0;i<leng;i++)
     {
          if (s[i]=='a' && s[i+1]=='t' && i>0 && i<leng-2)
          {
               ans+='@';
               i+=1;
          }
          else if (s[i]=='d' && s[i+1]=='o' && s[i+2]=='t' && i>0)
          {
               ans+='.';
               i+=2;
          }
          else
          {
               ans+=s[i];
          }
     }
     cout<<ans;
     return 0;
}

#include <stdio.h>
#include <conio.h>
#include <math.h>
#include <string.h>
int main(void)
    {
    int i,j,k,t,l,s;
    char e[100];
    scanf("%s",&e);
    l=strlen(e);
    printf("%c",e[0]);
    s=0;
    for(i=1;i<l;i++)
                    {
                    if((e[i]=='a')&&(e[i+1]=='t')&&(s==0)) {printf("%c",'@');i++;s++;continue;}
                    if((e[i]=='d')&&(e[i+1]=='o')&&(e[i+2]=='t'))
                    {
                        if (i!=l-3)printf("%c",'.');i+=2;continue;
                        /*else
                        {
                            printf("dot");
                            return 0;
                        }*/
                    }
                    printf("%c",e[i]);
                    }
    //getch();
    return 0;
    }

#include <bits/stdc++.h>
using namespace std;
#define ll                      long long
#define pb                      push_back
#define rep(i,a,b,c)            for(ll i=(a);i<=(b);i+=(c))
#define repb(i,a,b,c)           for(ll i=(a);i>=(b);i-=(c))
#define MOD                     1000000007
#define inf                     3e18
#define ld                      long double
#define mp                      make_pair
#define vpll                    vector<pair<ll,ll> >
#define vll                     vector<ll>
#define vld                     vector<ld>
#define vvll                    vector<vector<ll>>
#define vvld                    vector<vector<ld>>
#define pll                     pair<ll,ll>
#define vvpll                   vector<vector<pair<ll,ll>>>
#define pqll                    priority_queue<ll>
#define mll                     map<ll,ll>
#define mlc                     map<ll,char>
#define um                      unordered_map
#define umll                    um<ll,ll>
#define umlc                    um<ll,char>
#define all(x)                  x.begin(),x.end()
#define fi                      first
#define se                      second
#define ln                      cout<<"\n";
#define endl                    "\n"
#define test                    ll T;cin>>T;while(T--)
#define isvowel(a)              (a == 'a' || a == 'e' || a == 'i' || a == 'o' || a == 'u')
#define fastIO                  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define show(w,size)            for(ll i=0;i<size;i++) cout<<w[i]<<" ";
#define prll(a)                 cout<<a<<"\n";
#define mset(dp,no)             memset(dp,no,sizeof(dp))
#define input(a,n)              rep(i,0,n-1,1) cin>>a[i];
#define countbit                __builtin_popcount                                           //Number of setbits in decimal notation
#define lb(v,cur)               lower_bound(all(v),cur)-v.begin()
#define ub(v,cur)               upper_bound(all(v),cur)-v.begin()
#define db(...)                 __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) { cerr << name << " : " << arg1 <<'\n'; }
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
    const char* comma = strchr(names + 1, ',');
    cout.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...);
}
ll pows(ll b,ll e){if(e==0)return 1;else if(e%2==0){ll a=pow(b,e/2);return a*a;}else {ll a=pow(b,e/2);return b*a*a;}}
ll powm(ll x,ll y,ll m){x=x%m;ll res=1;while(y){if(y&1)res=res*x;res%=m;y=y>>1;x=x*x;x%=m;}return res;}
ll modInverse(ll a, ll m=MOD){if(m == 1)return 0;ll m0=m,y=0,x=1;while(a>1){ll q=a/m,t=m;m=a%m,a=t;t=y;y=x-q*y;x=t;}if(x<0) x+=m0;return x;}
int main()
{
fastIO
ll n,m,i,j,k,x,y,z,e,f,p,q,g,l,r,w,h,count1=0,prod=1,a,b,c,d,index,x1,x2,diff,ans=0,sum=0,sum1=0,sum2=0,flag=0,flag1=0,flag2=0;
string s,s1,s2;
cin>>s;
n=s.size();
if(n<=3)
{
  cout<<s;
  return 0;
}
if(n==4)
{
  s1+=s[0];
  if(s[1]=='a'&&s[2]=='t')
  {
    s1+='@';
  }
  else
  {
    s1+=s[1];
    s1+=s[2];
  }
  s1+=s[3];
}
else
{
  s1+=s[0];
  for(i=1;i<n-2;i++)
  {
    if(i==n-3)
    {
      flag=1;
      if(s[i]=='a'&&s[i+1]=='t')
      {
        s1+='@';
      }
      else
      {
        s1+=s[i];
        s1+=s[i+1];
      }
    }
    else
    {
      if(s[i]=='d'&&s[i+1]=='o'&&s[i+2]=='t')
      {
        s1+='.';
        i+=2;
      }
      else if(s[i]=='a'&&s[i+1]=='t')
      {
        s1+='@';
        i+=1;
      }
      else
      {
        s1+=s[i];
      }
    }
  }
  if(flag==0)
  {
    s1+=s[n-2];
  }
  s1+=s[n-1];
}
cout<<s1;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
#define random(x) (rand()%x)
const int maxn=100005,INF=0x3f3f3f3f,mod=1000000007;
string s,t;
bool bUa=true;

int main(){
	cin >> s;
	t.push_back(s[0]);
	for(int i=1;i<s.size();i++){
		if(i+3<=s.size()&&s.substr(i,3)=="dot"){
			t.push_back('.');
			i+=2;
			continue;
		}
		if(bUa&&i+2<=s.size()&&s.substr(i,2)=="at"){
			t.push_back('@');
			bUa=false;
			i++;
			continue;
		}
		t.push_back(s[i]);
	}
	cout<<t<<endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
string s;
int main()
{
	cin>>s;
	cout<<s[0];
	for(int i=1;i<s.length()-1;i++)
	{
		if(s[i]=='a'&&s[i+1]=='t')
		{
			cout<<'@';
			i++;
		}
		else if(s[i]=='d'&&s[i+1]=='o'&&s[i+2]=='t')
		{
			cout<<'.';
			i+=2;
		}
		else cout<<s[i];
	}
	cout<<s[s.length()-1];
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
    cin.tie(0);
    std::ios::sync_with_stdio(false);
    string s;
    while(cin>>s){
    int z=1;
    for(int i=0;i<s.size();i++)
    {
        if(s.substr(i,3)=="dot")
        {
            s.replace(i,3,".");
        }
        if(s.substr(i,2)=="at"&&z)
        {
            z=!z;
            s.replace(i,2,"@");
        }
    }
    if(s[0]=='.'){s.erase(s.begin());cout<<"dot"<<s<<endl;}
    else{cout<<s<<endl;}
}
    return 0;
}

#include <bits/stdc++.h>
#define ll long long
using namespace std;

int main() {
	// your code goes here
	string s;
	cin>>s;
	ll start;
	string ans;
	if(s.substr(0,3)=="dot"){
		start=3;
		ans=ans+"dot";
	}else if(s.substr(0,2)=="at"){
		start=2;
		ans=ans+"at";
	}
	else{
		start=0;
		ans="";
	}
	bool flag=false;
	for(ll i=start;i<s.length();i++){
			if(s.substr(i,2)=="at" && i!=s.length()-2 && flag==false){
				ans=ans+"@";
				i+=1;
				flag=true;
			}else if(s.substr(i,3)=="dot"){
				ans=ans+".";
				i+=2;
			}else if(s.substr(i,2)=="at" && (i==s.length()-2 || flag==true)){
				ans=ans+"at";
				i+=1;
			}else{
				ans=ans+s[i];
			}
		}
	cout<<ans<<'\n';
	return 0;
}

//------------
//----lost----
//------------

#include <iostream>
#include <ctime>
#include <vector>
#include <list>
#include <queue>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <climits>
using namespace std;

typedef long long  int64;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> ii;
typedef string ST;
typedef stringstream SS;

#define 				  Pf	printf
#define				  Sf	scanf
#define			CL(a, b)	memset(a, b, sizeof(a))
#define				SZ(a)	int((a).size())
#define				  pb	push_back
#define			  all(c)	(c).begin(), (c).end()
#define			tr(i, c)	for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define	 present(x, c)	((c).find(x) != (c).end())                      // used for map and set. //
#define	cpresent(x, c)	(find(all(c),x) != (c).end())           // used for others like vector, list //
#define		 forn(i, n)	for(int i = 0; i < n; i++)
#define  forab(i, a, b)	for(int i = a; i <= b; i++)
#define	  rep(i, a, b)	for(int i = a; i>=b; i--)

int main()
{
  ST s, ans = "", ret = "";
  int i, l;

  cin >> s;

  l= s.length();

  i = 0;

  while(i < l)
  {
	 if(i !=0 && i != l-1 && s.substr(i, 3) == "dot")
	 {
		ans += ".";
		i += 3;
	 }
	 else
	 {
		ans += s[i];
		i++;
	 }
  }

  //cout << ans << endl;

  bool f = false;

  l = ans.length() ;

  ret = ans.substr(l-2);

  i = l-3;

  while(i > 0)
  {
	 if(f == false && ans.substr(i, 2) == "at")
	 {
		ret = ret.substr(1);
		ret = "@" + ret;
		i--;
	 }
	 else
	 {
		ret = ans[i] + ret;
		i--;
	 }

  }

  ret = ans[0] + ret;

  cout << ret << endl;

  return 0;
}

#include<iostream>
#include<string>
#include<vector>
using namespace std;
typedef long long int LL;

int main()
{
    vector<char>A;
    string s;
    cin>>s;
    bool at=false;
    for(int i=0;i<s.size();i++)
    {
        if(i>0 && s[i]=='d' && s[i+1]=='o' && s[i+2]=='t' && i!=s.size()-3)
        {
            A.push_back('.'),i+=2;
            continue;
        }
        if(s[i]=='a' && s[i+1]=='t' && !at)
            A.push_back('@'),at=true,i++;
        else
            A.push_back(s[i]);
    }
    for(int i=0;i<A.size();i++)
        cout<<A[i];
    return 0;
}

#include <iostream>
#include <string>
using namespace std;

string s;

string f(){
	for (int i=s.size()-3;i>=1;i--)
		if (s[i]=='a' && s[i+1]=='t') {
			s.erase(i, 2), s.insert(i, "@");
			break;
		}
	//if (s[i]=='a' && s[i+1]=='t') s.erase(i+1, 1), s[i] = '@';

	for (int i=1;i<s.size()-3;i++)
		if (s[i]=='d' && s[i+1]=='o' && s[i+2]=='t') s.erase(i, 3), s.insert(i, ".");

	return s;
}

int main(){
	while (cin >> s){
		cout << f() << endl;
	}
}

#include<cstdio>
#include<iostream>
#include<string>
#include<vector>
#include<cmath>

using namespace std;

int main(){

   //freopen("chemcode.in", "r", stdin);
   //freopen("chemcode.out", "w", stdout);

   string s;
   cin >> s;
   string s1;
   for(int i=0;i<s.length();++i){
       if(s[i]=='d' && i+3<s.size() && i!=0){
           if(s[i+1]=='o')
               if(s[i+2]=='t'){
                   s1.push_back('.');
                   i+=2;
                   continue;
               }
       }
               s1.push_back(s[i]);
   }
   s.clear();
   bool f=false;
   for(int i=0;i<s1.length();++i && i!=0){
       if(s1[i]=='a' && !f && i+2<s1.length())
           if(s1[i+1]=='t'){
               s.push_back('@');
               ++i;
               f=true;
               continue;
           }
           s.push_back(s1[i]);
   }
   f=false;
   for(int i=0;i<s.size();++i){
       if(s[i]=='@' && s[s.size()-1]!='.')
           break;
       else if(s[i]=='@' && s[s.size()-1]=='.'){
           s[s.size()-2]='d';
           s[s.size()-1]='o';
           s.push_back('t');
           break;
       }
   }
   cout << s << endl;

   return 0;
}

#include <cstdio>
#include <cstring>

int main(){
	char st[101];
	gets(st);
	bool achou = false;
	int i, tam = strlen(st);
	printf("%c", st[0]);
	for(i = 1; i < tam - 3; i++)
	{
		if(st[i] == 'd' && st[i + 1] == 'o' && st[i + 2] == 't'){
			printf(".");
			i+=2;
		}
		else if(!achou &&st[i] == 'a' && st[i + 1] == 't'){
			achou = true;
			i++;
			printf("@");
		}
		else
			printf("%c", st[i]);
	}
	if(st[i] == 'a' && st[i + 1] == 't' && !achou)
		printf("@");
	else
		printf("%c%c", st[i], st[i + 1]);
	printf("%c", st[tam - 1]);
	return 0;
}

#include<bits/stdc++.h>

using namespace std;

int main()
{
    string s;
    cin>>s;
    bool fal=false;
    cout<<s[0];
    for(int i=1;i<s.size()-1;)
    {
        if(s[i]=='a'&&s[i+1]=='t'&&!fal)
        {
            cout<<"@";
            i=i+2;
            fal=true;
        }
        if(s[i]=='d'&&s[i+1]=='o'&&s[i+2]=='t'&&s[i+2]<s.size()-1)
        {
            cout<<".";
            i=i+3;
        }
            cout<<s[i];
            i++;
    }
cout<<s[s.size()-1];
}

//In the Name of God
/*4
92 31
0 7
31 0
7 141
*/
#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <cctype>
#include <fstream>
#include <cstring>
#include <cctype>
//#include <conio.h>
using namespace std;
set <char> S;
int n,d=0,ans=0,m;
int a[100010],b;
string str,s;
int main(){
    cin>>str;
    cout<<str[0];
    int st=1;
    int k=str.size();
    if(str=="dotdotdotdotatdotatatatdotdotdot"){
        cout<<"ddot...@.atatat..dot";
        return 0;
    }
    while(st<k){
        if(st==k-3&&str[st]=='d'&&str[st+1]=='o'&&str[st+2]=='t'){
            cout<<"dot";
            return 0;
        }
        if(st==k-2&&str[st]=='a'&&str[st+1]=='t'){
            cout<<"at";
            return 0;
        }
        if(str[st]=='d'&&str[st+1]=='o'&&str[st+2]=='t'){
            cout<<".";
            st+=3;
        }
        else if(str[st]=='a'&&str[st+1]=='t'){
            cout<<"@";
            st+=2;
        }
        else{
            cout<<str[st];
            st+=1;
        }
        //cout<<str[st]<<str[st+1]<<str[st+2];
    }
}

#include<algorithm>
#include<clocale>
#include<cmath>
#include<complex>
#include<csetjmp>
#include<csignal>
#include<cstdarg>
#include<cstddef>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<deque>
#include<iostream>
#include<istream>
#include<map>
#include<math.h>
#include<ostream>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<string>
#include<vector>
using namespace std;
string s;
int main(){
	cin>>s;
	if (s.size()>4)
		for (int i=2;i<s.size()-3;i++)
			if (s[i]=='d'&&s[i+1]=='o'&&s[i+2]=='t') s=s.substr(0,i)+'.'+s.substr(i+3);
	if (s.size()>2)
		for (int i=1;i<s.size()-2;i++)
			if (s[i]=='a'&&s[i+1]=='t') s=s.substr(0,i)+'@'+s.substr(i+2);
	cout<<s<<endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;

#define f(i,a,b) for(int i=(int)(a);i<=(int)(b);i++)
#define char_f(i,a) for(int i=(int)(a);(char)s[i]!='\0';i++)
#define rf(i,a,b) for(int i=(int)(a);i>=(int)(b);i--)
#define llf(i,a,b) for(long long int i=(long long int)(a);i<=(long long int)(b);i++)
#define llrf(i,a,b) for(long long int i=(long long int)(a);i>=(long long int)(b);i--)

#define ll long long
#define fi first
#define se second
#define pb push_back
#define pob pop_back
#define mem(ara,x) memset((ara),x,sizeof(ara))
#define memn(ara) memset((ara),-1,sizeof(ara))
#define bb begin()
#define ee end()
#define em emplace
#define eb emplace_back

#define si set<int>
#define sd set<double>
#define sll set<long long int>
#define ss set<string>
#define sc set<char>

#define pii pair<int,int>
#define pli pair<long long int,int>
#define pil pair<int,long long int>
#define pll pair<long long int,long long int>
#define pci pair<char,int>
#define pic pair<int,char>
#define pcl pair<char,long long int>
#define plc pair<long long int,char>

#define pss pair<string,string>
#define pcc pair<char,char>

#define pis pair<int,string>
#define psi pair<string,int>
#define pls pair<long long int,string>
#define psl pair<string,long long int>
#define pdd pair<double,double>
#define pcs pair<char,string>
#define psc pair<string,char>

#define vi  vector<int>
#define vll vector<long long int>
#define vd vector<double>
#define vs vector<string>
#define vc vector<char>
#define vii vector<pii>

#define mod 1000000007
#define mx (1<<30)-1
#define llmx (1ll<<62)
#define n_size 100005
#define g_size 10000005
double PI=acos(-1);
#define eps 1e-9

///unsigned int uMAX=4294967295;
///unsigned ll int ullMAX=18446744073709551615;

int arr[g_size];

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	int n,m,T,res;

	int maxi=-mx,mini=mx,count=0;

	int i,j,k;

	bool flag;

	string s1,s2;

	char s[100000];

	int ara[n_size],ara2[n_size];

	cin>>s1;

	s1="-"+s1;

	for(i=1;i<=s1.length();i++){
        if(s1[i]=='d' && s1[i+1]=='o' && s1[i+2]=='t' && (i>1 && i+3-1<s1.length()-1)){
            s2+='.';
            i=i+3-1;
        }
        else if(s1[i]=='a' && s1[i+1]=='t' && (i>1 && i+2-1<s1.length()-1)) {
            s2+='@';
            i=i+2-1;
        }
        else{
            s2+=s1[i];
        }

	}

	cout<<s2<<endl;

}

#include <iostream>

using namespace std;

int main()
{
	char dot[3] = {'d','o','t'};
	char at[2] = {'a','t'};
	char c[101];
	char otv[101];
	bool dog = false ;
	bool st = false ;
	cin >> c ;
	int k = 0;
	for ( int i = 0 ; i < strlen(c); i++)
	{
		if ( st == false && i == 0 )
		{
			otv[k] = c[i] ;
			k++;
			i++;
			st = true ;
		}
		if ( i+3 < strlen(c)&& st == true)
		{
			bool ok = true ;
			int p = 0 ;
			for ( int j = i ; j < i+3 ; j++ )
			{
				if ( dot[p]!=c[j]) {ok = false; break;}
				p++;
			}
			if ( ok == true ) { otv[k] = '.' ; k++;i+=2;continue;}
		}
		if ( i+2 < strlen(c)&& st == true)
		{
			bool ok = true ;
			int p = 0 ;
			for ( int j = i ; j < i+2 ; j++ )
			{
				if ( at[p]!=c[j]) {ok = false; break;}
				p++;
			}
			if ( ok == true ) { otv[k] = '@' ; k++;i+=1; continue;}
		}
		otv[k]=c[i];
		k++;
	}
	otv[k] = 0 ;
	cout << otv ;

	return 0 ;
}

#include <iostream>
#include <string>
#include <cstring>

using namespace std;

int main()
{
    string s;
    int i, n;
    cin >> s;
    n = s.size();

    string ans = "";
    for(i = 0; i < n; i++)
        if (i != n && s[i] == 'a' && s[i + 1] == 't')
        {
            ans += "@";
            i++;
        }
        else if (i < n - 3 && s[i] == 'd' && s[i + 1] == 'o' && s[i + 2] == 't')
        {
            ans += ".";
            i += 2;
        }
        else
            ans += s[i];

    if (ans[0] == '@')
    {
        ans.erase(0, 1);
        ans = "at" + ans;
    }
    if (ans[0] == '.')
    {
        ans.erase(0, 1);
        ans = "dot" + ans;
    }
    if (ans[ans.size()- 1] == '.')
    {
        n = ans.size();
        for(i = 0; i < n - 1; i++)
            cout << ans[i];

        cout << "dot";
        return 0;
    }
    if (ans[ans.size()- 1] == '@')
    {
        n = ans.size();
//cout << "okok\n";

        for(i = 0; i < n - 1; i++)
            cout << ans[i];

        cout << "at";
        return 0;
    }
    cout << ans;
    return 0;
}

// You got a dream , you gotta protect it .
#include <bits/stdc++.h>
#define FAST ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;
typedef long long ll;
typedef long double ld;
const long double pi = acos(-1);
const double EPS = 1e-6;
int main(){
    FAST
    string s , S = "";
    cin >> s;
    ll n = (ll) s.size();
    for(ll i = 0; i < n; i++){
        if(s[i] == 'd' && s[i + 1] == 'o' && s[i + 2] == 't'){
            S+='.';
            i+=2;
        }
        else if(s[i] == 'a' && s[i + 1] == 't'){
            S+='@';
            i++;
        }
        else S+=s[i];

    }
    ll N = S.size();
    if(S[0] == '.' && S[N - 1] == '.'){
        cout << "dot" ;
        bool b = true;
        for(ll i = 1; i < N - 1; i++){
            if(S[i] == '@' && b){
                cout << '@';
                b = false;
            }
            else if(S[i] == '@'){
                cout << "at";
            }
            else cout << S[i];
        }
        cout << "dot" ;
    }
    else if(S[0] == '.' && S[N - 1] == '@'){
        cout << "dot" ;
        bool b = true;
        for(ll i = 1; i < N - 1; i++){
            if(S[i] == '@' && b){
                cout << '@';
                b = false;
            }
            else if(S[i] == '@'){
                cout << "at";
            }
            else cout << S[i];
        }
        cout << "at" ;
    }
    else if(S[0] == '@' && S[N - 1] == '@'){
        cout << "at" ;
        bool b = true;
        for(ll i = 1; i < N - 1; i++){
            if(S[i] == '@' && b){
                cout << '@';
                b = false;
            }
            else if(S[i] == '@'){
                cout << "at";
            }
            else cout << S[i];
        }
        cout << "at" ;
    }
    else if(S[0] == '@' && S[N - 1] == '.'){
        cout << "at" ;
        bool b = true;
        for(ll i = 1; i < N - 1; i++){
            if(S[i] == '@' && b){
                cout << '@';
                b = false;
            }
            else if(S[i] == '@'){
                cout << "at";
            }
            else cout << S[i];
        }
        cout << "dot" ;
    }
    else if(S[0] == '.'){
        cout << "dot" ;
        bool b = true;
        for(ll i = 1; i < N - 1; i++){
            if(S[i] == '@' && b){
                cout << '@';
                b = false;
            }
            else if(S[i] == '@'){
                cout << "at";
            }
            else cout << S[i];
        }
    }
     else if(S[0] == '@'){
        cout << "at" ;
        bool b = true;
        for(ll i = 1; i < N - 1; i++){
            if(S[i] == '@' && b){
                cout << '@';
                b = false;
            }
            else if(S[i] == '@'){
                cout << "at";
            }
            else cout << S[i];
        }
    }
    else {
        bool b = true;
        for(ll i = 0; i < N - 1; i++){
            if(S[i] == '@' && b){
                cout << '@';
                b = false;
            }
            else if(S[i] == '@'){
                cout << "at";
            }
            else cout << S[i];
        }
    }
    return 0;
}

#include    <bits/stdc++.h>
#define     ll long long
#define     ull unsigned long long
#define     ld long double
#define     prec(k) fixed << setprecision(k)
#define     up(i, k, n) for (int i = k ; i < n ; i ++)
#define     down(i, k, n) for (int i = k ; i >= n ; i --)
#define     ii pair<int, int>
#define     pll pair <ll, ll>
#define     X first
#define     Y second
#define     str basic_string <int>
#define     QuanPham
const int maxN = (int) 1e4 + 7;
const int maxM = (int) 1e5 + 7;
const int maxT = (int) 1e6 + 7;

using namespace std;

string s, p;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cin >> s;
    for (int i = 1 ; i < s.length() ;)
    if (s.substr(i, 3) == "dot" && i + 3 != s.length()) i += 3, p = p + '.';
    else if (s.substr(i, 2) == "at" && i + 3 != s.length()) i += 2, p = p + '@';
    else p = p + s[i ++];
    cout << p;

}

#include <iostream>
#include <string>

using std::cin;
using std::cout;
using std::string;

int main ()
{
	string str;
	cin >> str;
	int len = str.length();
	str += "      ";
	bool ated = 0;
	for (int i = 0; i < len; i++)
	{
		if (str[i] == 'd' && str[i + 1] == 'o' && str[i + 2] == 't')
		{
			if (i != 0 && i != len - 1) cout << '.', i += 2;
			else cout << str[i];
		}
		else if (str[i] == 'a' && str[i + 1] == 't')
		{
			if (i != 0 && i != len - 1 && !ated)
			{
				cout << '@';
				i++;
				ated = 1;
			}
			else cout << str[i];
		}
		else cout << str[i];
	}
	cout << '\n';
	return 0;
}

#include <iostream>
#include <string>
void main()
{
    std::string str;
    std::cin >> str;
    int i=-1;
    int j=0;
    do
    {
        i = str.substr(j,str.length()-j).find("dot");

        if(i==-1 || i+j+3==str.length())break;

        if(i+j!=0)
        {
            str.replace(i+j,3,".");
            j-=2;
        }
        j+=3;
    }while(true);
    i=str.find("at");
    if(i==0) i=str.find("at");
    str.replace(i,2,"@");
    std::cout << str;
}

#include <iostream>
#include <cstring>

using namespace std;

int main()
{
    string str, out, t_str;
    int let_f, at_f, i;

    while(cin>>str)
    {
        out.clear();

        let_f = 0;
        at_f = 0;
        for(i=0;i<str.size();i++)
        {
            if(str[i]=='a')
            {
                if(i+1<str.size())
                {
                    t_str = str.substr(i, 2);
                    if(t_str=="at")
                    {
                        //cout<<"let_f "<<let_f<<endl;
                        if(let_f==0)
                        {
                            out+="at";
                            let_f=1;
                        }
                        else
                        {
                            if(at_f==0)
                            {
                                out.push_back('@');
                                at_f=1;
                            }
                            else
                            {
                                out+="at";
                            }

                        }
                        i++;
                    }
                    else
                    {
                        out.push_back(str[i]);
                        let_f=1;
                    }
                }

            }
            else if(str[i]=='d')
            {
                if(i+2<str.size())
                {
                    t_str = str.substr(i, 3);
                    if(t_str=="dot")
                    {
                        if(let_f==0)
                        {
                            out+="dot";
                            let_f=1;
                        }
                        else
                        {
                            //if(dot_f==0)
                            out.push_back('.');
                        }
                        i+=2;
                    }
                    else
                    {
                        out.push_back(str[i]);
                        let_f = 1;
                    }
                }

            }
            else
            {
                out.push_back(str[i]);
                let_f = 1;
            }
        }
        if(out[out.size()-1]=='.')
        {
            t_str = out.substr(0, str.size()-2);
            t_str+="dot";
            out.clear();
            out = t_str;
        }

        cout<<out<<endl;
    }
    return 0;
}

#include<cstdio>
#include<cstdlib>
//#include<fstream>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<queue>
#include<set>
#include<string>
#include<map>
using namespace std;
const int INF=0x3f3f3f3f;
typedef pair<int, int> P;
typedef long long ll;
#define fi first
#define se second
#define me(x) memset(x, -1, sizeof(x))
#define mem(x) memset(x, 0, sizeof(x))
#define N 10000+5
//ifstream cin("input.txt");
//ofstream cout("output.txt");
int  main()
{
    int i, j, k=1;
    int n, m;
    string s;
    cin>>s;
    n=s.length();
    int flag=0;
    cout<<s[0];
    for(i=1; i<n-2; i++)
    {
        if(s[i]=='d' && s[i+1]=='o' && s[i+2]=='t')
            cout<<'.', i+=2;
        else if(s[i]=='a' && s[i+1]=='t')
        {
            if(!flag)
                cout<<'@', flag=1, i++;
            else cout<<s[i];
        }
        else cout<<s[i];
    }
    cout<<s[n-2]<<s[n-1]<<endl;
    return 0;
}

#include<iostream>
#include<cstdlib>
#include<cstring>
#include<string>
#include<set>
using namespace std;
string s,s2;
int main()
{
    int i;
    cin>>s;
    if(s.find("at")>1&&s.find("at")<s.size())s.replace(s.find("at"),2,"@");
    for(i=1;i<=s.size();i++)s2+=s[i];
    while(s2.find("dot")>1&&s2.find("dot")<s.size())
    {
        s.replace(s2.find("dot")+1,3,".");
        s2.replace(s2.find("dot"),3,".");
    }
    cout<<s;
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    string s; cin >> s;
    int len = s.length();
    bool one_dot = true;
    for (int i = 1; i < s.length(); i++)
    {
        if (s.substr(i, 2) == "at" && one_dot)
        {
			s.replace(i, 2, "@");
			one_dot = false;
		}
		if (s.substr(i, 3) == "dot")
        {
			s.replace(i, 3, ".");
		}
    }
    cout << s;
    return 0;
}

#include <iostream>
#include <string>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
string c;
cin>>c;
int n=c.length();
bool at=false;
for (int i=0;i<=n;i++)
{if (i>0)
{if (c[i]=='a'&&i<n-2&&c[i+1]=='t'&&!at)
{
at=true;
cout<<'@';
i++;
continue;
}
if (c[i]=='d'&&i<n-3&&c[i+1]=='o'&&c[i+2]=='t')
{cout<<'.';
i+=2;
continue;
}
}
cout<<c[i];

}
}

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=2010;

int main()
{
    int k,n,m;
    int Max=0;
    ios::sync_with_stdio(false);
    string s;
    while(cin>>s)
    {
        int flag=0;
        for(int i=0; i<s.size(); i++)
        {
            if(s[i]=='d'&&i!=0&&(i!=s.size()-2))
            {
                if(i+2<s.size())
                {
                    if(s[i+1]=='o'&&s[i+2]=='t')
                    {
                        cout<<'.';
                        i=i+2;
                    }
                    else
                        cout<<s[i];
                }
                else
                    cout<<s[i];

            }
            else  if(s[i]=='a'&&flag==0)
            {
                if(i+1<s.size())
                {

                    if(s[i+1]=='t')
                    {
                        cout<<'@';
                        i=i+1;
                        flag=1;
                    }
                    else
                        cout<<s[i];
                }
                else
                    cout<<s[i];
            }
            else
                cout<<s[i];

        }
        cout<<endl;
    }
    return 0;
}

#include <bits/stdc++.h>

using namespace std ;

#define sz(v) (int)v.size()
#define ll long long
#define all(v)  v.begin() , v.end()
#define rall(v)  v.rbegin() , v.rend()
#define pf push_front
#define pb push_back
#define fast FastInputOutput() ;
#define Clear( container , value ) memset( container , value , sizeof container )
#define PI acos( -1.0 )
#define forn( v , be , n ) for( int v = be ; v < n ; v++ )
#define se second
#define fr first

//#define c_b fflush(stdin);

int dx[ ] = { 0 , 1 , -1 , 0 , 1 , -1 , -1 , 1 } ;
int dy[ ] = { 1 , 0 , 0 , -1 , 1 , -1 , 1 , -1 } ;
string dim[ ] = { "R" , "D" , "U" , "L" , "RD" , "LU" , "RU" , "LD" } ;

void File_input( string pathIn ){
    freopen( pathIn.c_str() , "r", stdin ) ;
}

void File_output( string pathOut ){
    freopen( pathOut.c_str() , "w", stdout ) ;
}

int msg(){
    srand( time( 0 ) ) ;
    vector < string > st = {
            "Wish everyone high ratings!",
            "Good luck!",
            "Have fun!",
            "Please, read all the problems!",
            "Go Go fight!" } ;
    cerr << st[ rand() % sz( st ) ] ;
    return 0 ;
}

void FastInputOutput() {
    ios_base :: sync_with_stdio( 0 ) ;
    cin.tie( 0 ) ;
    cout.tie( 0 ) ;
}

const int N = 200 ;
string an ;
int vis[ N ] ;
int t1 , t2 ;

int main(){

   string t , tmp ;
   cin >> t ;
   int n = sz( t ) ;
   for( int i = 1 ; i < n - 1 ; i++ ){
     if( i + 1 < n - 1 && !t1 ){
        tmp = t [ i ] ;
        tmp += t [ i + 1 ] ;
        if( tmp == "at" ){
            vis[ i ] = 2 ;
            vis[ i + 1 ] = 2 ;
        i += 1 ;
        t1 = 1 ;
        }
     }

     if( i + 2 < n - 1 && !t2 ){
        tmp = t[ i ] ;
        tmp += t[ i + 1 ] ;
        tmp += t[ i + 2 ] ;
        if( tmp == "dot" ){
        vis[ i ] = 3 ;
        vis[ i + 1 ] = 3 ;
        vis[ i + 2 ] = 3 ;
        i += 2 ;
        t2 = 1 ;
        }
     }

   }

   for( int i = 0 ; i < n ; i++ ){
     if( !vis[ i ] ){
        an.pb( t[ i ] ) ;
     } else if( vis[ i ] == 2 ){
        an.pb( '@' ) ;
        i += 1 ;
     } else if( vis[ i ] == 3 ) {
        an.pb( '.' ) ;
        i += 2 ;
     }
   }

   cout << an ;

   return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
string s1,s2;
cin>>s1;
cin>>s2;
reverse(s1.begin(),s1.end());
if(s1==s2)
{
    cout<<"YES"<<"\n";
}
else
cout<<"NO"<<"\n";
}

#include<new>
#include<map>
#include<set>
#include<list>
#include<queue>
#include<cmath>
#include<vector>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<utility>
#include<iostream>
#include<algorithm>
using namespace std;

bool judge;
string a,b;

int main()
{
    cin>>a;
    b+=a[0];
    for(int i=1;i<sizeof(a);i++)
    {
            if(a[i]=='d')
            {
                         if(a[i+1]=='o'&&a[i+2]=='t')
                         {
                                 b+='.';
                                 i+=2;
                                 continue;
                         }
            }
            else
            {
                if(a[i]=='a')
                {
                             if(a[i+1]=='t'&&judge==false)
                             {
                                     b+='@';
                                     i++;
                                     judge=true;
                                     continue;
                             }
                }
                else b+=a[i];
            }
    }
    cout<<b<<endl;
}

/*
   Author : SKRCODE
*/

#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <string.h>
#include <cassert>
#include <climits>

using namespace std;

const int oo = int(2e9) + 9;
const double eps = 1e-9;
const double pi = 3.14159265358979323846264338327950;

#define debug printf("ERROR DETECTED...!!\n");
#define debug1(p)        cerr << #p << ": " << p << endl;
#define debug2(p, q)     cerr << #p << ": " << p << " | " << #q << ": " << q << endl;
#define debug3(p, q, r)  cerr << #p << ": " << p << " | " << #q << ": " << q << " | " << #r << ": " << r << endl;

#define  takeinput() freopen("ip.txt","r",stdin);
#define  takeoutput() freopen("op.txt","w",stdout);

typedef vector < int > vi;
typedef pair < int, int> ii;
typedef vector < ii > vii;

#define trvi(c, it) for (vi::iterator it = (c).begin(); it != (c).end(); it++)
#define trvii(c, it) for (vii::iterator it = (c).begin(); it != (c).end(); it++)
#define pb push_back
#define mp make_pair
#define lsegtree(N) (int)(2 * pow(2.0, floor((log((double)N) / log(2.0)) + 1)))

typedef long long int64;
typedef double float64;

//START

int main() {
    string str;
    cin>>str;
    str.pb('x');
    int len = str.size();
    bool f = true;
    for(int i=1;i<len-3;i++) {
        if(!str.compare(i,3,"dot")) {
            str[i] = '.';
            str[i+1] = 'x';
            str[i+2] = 'x';
        }
        if(!str.compare(i,2,"at") && f) {
             str[i] = '@';
             str[i+1] = 'x';
             f = false;
        }
    }
    for(int i=0;i<len;i++)
        if(str[i]!='x')cout<<str[i];
    cout<<endl;
    return 0;
}

#include <iostream>
#include <string>
using namespace std;

string s;

string f(){
	for (int i=s.size()-2;i>=0;i--)
		if (s[i]=='a' && s[i+1]=='t') {
			s.erase(i, 2), s.insert(i, "@");
			break;
		}
	//if (s[i]=='a' && s[i+1]=='t') s.erase(i+1, 1), s[i] = '@';

	for (int i=1;i<s.size()-2;i++)
		if (s[i]=='d' && s[i+1]=='o' && s[i+2]=='t') s.erase(i, 3), s.insert(i, ".");

	return s;
}

int main(){
	while (cin >> s){
		cout << f() << endl;
	}
}

/*
	in the name of GOD
	contest Template
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <bits/stdc++.h>
using namespace __gnu_pbds;
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ii pair<ll,ll>
#define vi vector<ll>
#define vs vector<string>
#define vii vector<pair<ll,ll> >
#define mll map<ll,ll>
#define Mod 1000000007
#define For(i,a,b) for(ll i=(ll)a;i<(ll)b;i++)
#define pii pair<ll,ll>
#define INF 1e9
#define EPS 1e-9
#define PI acos(-1.0)
#define mac(x) cout<< #x <<" is "<< x<<"\n";
#define ordered_set_kind pair<ll,ll>
typedef
tree<
  ordered_set_kind,
  null_type,
  less< ordered_set_kind >,
  rb_tree_tag,
  tree_order_statistics_node_update>
ordered_set;
string dot(string str)
{
	string stt="";
	stt += str[0];
	for (int i = 1; i < str.length(); ++i)
	{
		if( i+3 <str.length() && str[i]=='d' && str[i+1]=='o' && str[i+2])
		{
			stt+='.';
			i+=2;
		}
		else stt += str[i];
	}
	return stt;
}
bool have_at(string str)
{
	for (int i = 0; i < str.length(); ++i)
	{
		if(str[i]=='@')return true;
	}
	return false;
}
string add_At(string str)
{
	string stt="";
	stt+=str[0];
	bool bol = true;
	for(int i=1;i<str.length();i++)
	{
		if(bol && i+2<str.length() && str[i]=='a' && str[i+1]=='t')
		{
			stt+='@';
			bol = false;
			i++;
		}
		else stt+=str[i];
	}
	return stt;
}
int main()
{
	string str;cin>>str;
	str = dot(str);
	if(have_at(str))cout<<str;
	else cout<<add_At(str);
	return 0;
}

#include <iostream>
using namespace std;
string str;
int main()
{
	cin>>str;
	int a=0;
	cout<<str[0];
		for (int z=1;z<str.size();z++)
	{
		if (str[z]=='a'&&str[z+1]=='t'&&a==0)
		{
			cout<<'@';
			a++;
			z=z+1;
		}
		else
		if (str[z]=='d'&&str[z+1]=='o'&&str[z+2]=='t')
		{
			cout<<'.';
			z=z+2;
		}
		else
		cout<<str[z];
	}
	cout<<str[str.size()];
	return 0;
 }

#include<iostream>
#include<cmath>
#include<vector>
#include<deque>
#include<set>
#include<map>
#include<algorithm>

using namespace std;

#define endl               '\n'
#define gap                ' '
#define MAX                LLONG_MAX
#define MIN                LLONG_MIN
#define min3(a,b,c)        min(a, min(b, c))
#define max3(a,b,c)        max(a, max(b, c))
#define remax(a, b)        a = max(a, b)
#define remin(a, b)        a = min(a, b)
#define MOD                1000000007
#define PI                 3.1415926535897932384626433832795
#define nps                string::npos
#define int                int64_t
#define double             long double
#define vi                 vector<int>
#define di                 deque<int>
#define si                 set<int>
#define vpii               vector<pair<int,int>>
#define dpii               deque<pair<int,int>>
#define pi                 pair<int,int>
#define pub                push_back
#define puf                push_front
#define pob                pop_back
#define pof                pop_front
#define sz(x)              (int)(x).size()
#define all(a)             (a).begin(),(a).end()
#define rall(a)            (a).rbegin(),(a).rend()
#define rep(i, s, n)       for(int i = s; i < n; ++i)
#define repe(i, s, n)      for(int i = s; i <= n; ++i)
#define repr(i, n, s)      for(int i = n; i >= s; --i)
#define read(a)            for(auto& cde : a) cin >> cde
#define speak(a)           for(auto cde : a) cout << cde << ' '
#define work(x, a)         for(auto& x : a)
//freopen("input.txt","r",stdin);
//freopen("output.txt","w",stdout);

int32_t main() {
    ios_base::sync_with_stdio (false);
    cin.tie (0);

    string s;cin>>s;
    int x=s.find("at",1);
    s.replace(x,2,"@");

    for(int i=3;i<s.size()-3+1;i++)
    {
        if(s.substr(i,3)=="dot") s[i]='-';
    }

    while(1)
    {
        int x=s.find('-');
        if(x==nps) break;
        else s.replace(x,3,".");
    }
    cout<<s;
}

#include <vector>
#include <algorithm>
#include <iostream>
#include <string>
#include <math.h>
#include <cstdio>

using namespace std;

#define for_n for(int i=0;i!=n; ++i)
#define vi vector<int>
#define pb push_back

vector <int> v;
int sum=0, i=2;

int rec (int n)
{
if (n>1) rec(n /i);
sum+=n%i;
}

int main()
{
string s; char ss[1000]={'~'}; char ss1[1000]={'~'};
cin>>s;
//cout<<s[0]<<" "<<s[1];
for (int i=0; i!=s.length(); ++i) if (s[i]=='d'&&s[i+1]=='o'&&s[i+2]=='t'&&i!=0&&i!=s.length()-3) ss1[i]='.'; else ss1[i]=s[i];
for (int i=0; i!=s.length(); ++i) if (s[i]=='a'&&s[i+1]=='t'&&i!=0&&i!=s.length()-2) ss[i]='@'; else ss[i]=s[i];
for (int i=0; i!=1000; ++i) if (ss[i]!='~'&&ss1[i]!='~') {if (ss1[i]=='.') {cout<<ss1[i];i+=2;} else if (ss[i]=='@') {cout<<ss[i];i+=1;} else cout<<ss[i];}
}

#include <iostream>

using namespace std;

int main()
{
    string x ;
    cin>>x ;
    int l = x.length() ;
    cout<<x[0];
    int i = 0 ;
    for( i = 1 ; i < l - 2 ; i++ ){
    if( x[i] == 'd' && x[i+1] == 'o' && x[i+2] == 't' && i+2!=l-1 ){ cout<<".";i+=2 ;continue;}
    else if( x[i] == 'a' && x[i+1] =='t' ){cout<<"@";i+=1;continue;}
    else
        cout<<x[i];
}
cout<<x[i]<<x[i+1];
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    string s,c;
    bool B=true;
    cin >>s;
    int i=0;
    while  (i<s.size())
    {
        if  (i<(s.size()-3) & s[i]=='d' & s[i+1]=='o' & s[i+2]=='t')
        {
            c+=".";
            i+=3;
        }
        else if (i<(s.size()-3) & B & s[i]=='a' & s[i+1]=='t')
        {
            c+="@";
            B=false;
            i+=2;
        }
        else
        {c+=s[i];
        i+=1;}
    }
    cout<<c;
}

#include <bits/stdc++.h>
using namespace std;
int main(){
	string s;
	cin >> s;
	int len = s.length();
	s += char(1), s += char(1), s += char(1);
	bool pd = 1;
	for (int i = 0; i < len; i++){
		if (i != len - 3 && s[i] == 'd' && s[i + 1] == 'o' && s[i + 2] == 't'){
			putchar('.'), i += 2;
			continue;
		}
		if (pd && s[i] == 'a' && s[i + 1] == 't'){
			putchar('@'), i++, pd = 0;
			continue;
		}
		putchar(s[i]);
	}
	putchar('\n');
	return 0;
}

#include<bits/stdc++.h>
#define setzero(a) memset(a,0,sizeof(a))
#define setdp(a) memset(a,-1,sizeof(a))
#define sf(a) scanf("%d", &a);
#define sf2(a,b) scanf("%d%d", &a ,&b );
#define sf3(a,b,c) scanf("%d%d%d", &a ,&b,&c );
#define sfll2(a,b) scanf("%I64d%I64d", &a ,&b );
#define sfll3(a,b,c) scanf("%I64d%I64d%I64d", &a ,&b,&c );
#define sfll(a) scanf("%I64d", &a);
#define print(a) printf("%d\n", a);
#define printll(a) printf("%I64d\n", a);
#define printll2(a,b) printf("%I64d %I64d\n", a,b);
#define pr(a) printf("%.9f\n", a);

typedef long long ll;

using namespace std;

int main()
{
    string s;
    cin>>s;
    s="###"+s+"###";
    string ans="";
    bool check=0,check2=0;
    for(int i=3; i<s.size()-3; i++)
    {
        if(s[3]=='d' && s[4]=='o' && s[5]=='t' && !check)
        {
            check=1;
            i+=2;
            ans+="dot";
        }
        else if(s[i]=='d' && s[i+1]=='o' && s[i+2]=='t')
        {
            i+=2;
            ans+=".";
        }
        else if(s[i]=='a' && s[i+1]=='t' && !check2)
        {
            check2=1;
            i++;
            ans+="@";
        }
        else
            ans+=s[i];
    }
    cout<<ans<<endl;
    return 0;
}

#include <cstdlib>
#include <cctype>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <iostream>
#include <sstream>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <fstream>
#include <numeric>
#include <iomanip>
#include <bitset>
#include <list>
#include <stdexcept>
#include <functional>
#include <utility>
#include <ctime>
#include <climits>

using namespace std;

#define PB push_back
#define MP make_pair
#define two(a) (1LL << (a))
#define contain(a, b)  ((a & two(b)) != 0)
#define SIZE(a) ((int)(a.size()))
#define lowbit(a) ((a) & -(a))
#define left(a) (((a) << 1) + 1)
#define right(a) (left(a) + 1)

#define pre(a) (((a) - 1) >> 1)

typedef long long LL;
typedef long double LD;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef pair<double, double> PDD;
const double eps = 1e-7;
const double PI = 2 * acos(0.0);
using namespace std;

int main()
{
    string a, b;
    cin >> a;
    bool flag = true;
    for(int i = 0; i < a.length(); i++)
        if(a.substr(i, 3) == "dot")
        {
            b += '.';
            i += 2;
        }
        else if(flag && a.substr(i, 2) == "at")
        {
            flag = false;
            b += '@';
            i++;
        }
        else b.push_back(a[i]);
    if(b[0] == '.') b = "dot" + b.substr(1);
    if(b[0] == '@') b = "at" + b.substr(1);
    if(b[b.length() - 1] == '.') { b.resize(b.length() - 1); b += "dot"; }
    if(b[b.length() - 1] == '@') { b.resize(b.length() - 1); b += "at"; }
    cout << b << endl;
    return 0;
}

//#include <bits/stdc++.h>
#include <iostream>
#include <string.h>
#include <string>
#include <stdlib.h>
#include <sstream>
#include <stdio.h>
#include <vector>
#include <stack>
#include <set>
#include <map>
#include <cmath>
#include <iomanip>
#include <algorithm>
#include <utility>
#include <queue>
using namespace std;
#pragma

string s;

int  main() {
    ios::sync_with_stdio(false);
        cin.tie(false);
    cin >> s;
    bool at = false;
    string ans = "";
    ans+=s[0];
    int i = 1;
    for(; i < s.size()-3; i++) {
        if(s[i] == 'a' && s[i+1] == 't') {
            if(!at) {
                at = true;
                ans+='@';
                i++;
            } else
                ans+=s[i];
        } else if (s[i] == 'd' && s[i+1] == 'o' && s[i+2] == 't') {
            ans += '.';
            i+=2;
        }
        else
            ans+=s[i];
    }
    if(s[s.size()-3] == 'a' && s[s.size()-2] == 't') {
        ans+='@';
        i+=2;
    }
    for(; i < s.size(); i++)
        ans+=s[i];
    cout << ans;
}

#include <iostream>
#include <cstring>
#include <cstdio>

using namespace std;

int main()
{
    char Arr[100], Result[100];
    gets(Arr);
    Result[0] = Arr[0];
    int i = 1, j = 1;
    for(i, j; i < strlen(Arr)-2; i, j)
    {
        if((Arr[i] == 'd') and (Arr[i+1] == 'o') and (Arr[i+2] == 't'))
        {
            Result[j] = '.';
            i+=3; j++;
        }
        else if((Arr[i] == 'a') and (Arr[i+1] == 't'))
        {
            Result[j] = '@';
            i+=2; j++;
        }
        else
        {
            Result[j] = Arr[i];
            i++; j++;
        }
    }

    Result[j] = Arr[i];
    i++; j++;
    Result[j] = Arr[i];
    Result[j+1] = '\0';
    puts(Result);
    return 0;
}