Sometimes one has to spell email addresses over the phone. Then one usually pronounces a dot as dot, an at sign as at. As a result, we get something like vasyaatgmaildotcom. Your task is to transform it into a proper email address (vasya@gmail.com). 

It is known that a proper email address contains only such symbols as . @ and lower-case Latin letters, doesn't start with and doesn't end with a dot. Also, a proper email address doesn't start with and doesn't end with an at sign. Moreover, an email address contains exactly one such symbol as @, yet may contain any number (possible, zero) of dots. 

You have to carry out a series of replacements so that the length of the result was as short as possible and it was a proper email address. If the lengths are equal, you should print the lexicographically minimal result. 

Overall, two variants of replacement are possible: dot can be replaced by a dot, at can be replaced by an at. 

Input

The first line contains the email address description. It is guaranteed that that is a proper email address with all the dots replaced by dot an the at signs replaced by at. The line is not empty and its length does not exceed 100 symbols.

Output

Print the shortest email address, from which the given line could be made by the described above replacements. If there are several solutions to that problem, print the lexicographically minimal one (the lexicographical comparison of the lines are implemented with an operator < in modern programming languages).

In the ASCII table the symbols go in this order: . @ ab...z

Examples

Input

vasyaatgmaildotcom


Output

vasya@gmail.com


Input

dotdotdotatdotdotat


Output

dot..@..at


Input

aatt


Output

a@t

Source: codeforces | Difficulty: EASY
Tags: Implementation


Solutions:
a = input()
b = ''
if a[0] + a[1] + a[2] == 'dot':
	b += 'dot'
	i = 3
elif a[0] + a[1] == 'at':
	b += 'at'
	i = 2
else:
	i = 0
at = 0
while i < len(a) - 3:
	if a[i] == 'd' and a[i + 1] == 'o' and (a[i + 2] == 't'):
		b += '.'
		i += 3
	elif a[i] == 'a' and a[i + 1] == 't' and (at == 0):
		b += '@'
		at = 1
		i += 2
	else:
		b += a[i]
		i += 1
if a[i] + a[-1] == 'at' and at == 0:
	b += '@'
	b += a[i + 2]
else:
	for j in range(i, len(a)):
		b += a[j]
print(b)


s = str(input())
s = s.replace('at', '@', 1)
s = s.replace('dot', '.')
if s[0] == '.':
	s = 'dot' + s[1:]
if s[0] == '@':
	s = s.replace('at', '@', 1)
	s = 'at' + s[1:]
if s[len(s) - 1] == '.':
	s = s[:len(s) - 1] + 'dot'
print(s)


import math
from collections import defaultdict
ml = lambda : map(int, input().split())
ll = lambda : list(map(int, input().split()))
ii = lambda : int(input())
ip = lambda : list(input())
ips = lambda : input().split()
t = ip()
ans = t[0]
n = len(t)
dot = 'dot'
at = 'at'
f = 0
i = 1
while i < n:
	if i + 2 < n - 1:
		if t[i] + t[i + 1] + t[i + 2] == dot:
			ans += '.'
			i += 3
			continue
	if i + 1 < n and f == 0:
		if t[i] + t[i + 1] == at:
			ans += '@'
			f = 1
			i += 2
			continue
	ans += t[i]
	i += 1
print(ans)


email = input()
m = {'@': 'at', '.': 'dot'}
replaced = ''
addAtLast = False
sep = []

def removeFirstLast(ch):
	global replaced, addAtLast, sep, email
	if m[ch] in email:
		if sep[0] == '':
			del sep[0]
			replaced = m[ch] + sep[0]
		else:
			replaced = sep[0]
		if len(sep) > 0:
			if sep[-1] == '':
				del sep[-1]
				addAtLast = True
	else:
		replaced = sep[0]

def addLast(ch):
	global replaced, addAtLast
	if addAtLast:
		replaced += m[ch]
sep = email.split(m['.'])
removeFirstLast('.')
for word in sep[1:]:
	replaced += '.' + word
addLast('.')
email = replaced
replaced = ''
addAtLast = False
sep = email.split(m['@'])
removeFirstLast('@')
count = 0
for word in sep[1:]:
	if count < 1:
		replaced += '@' + word
		count += 1
	else:
		replaced += 'at' + word
addLast('@')
print(replaced)


s = input()
email = s[0]
pointer = 1
at_not_used = True
while pointer < len(s):
	if s[pointer] == 'd' and pointer < len(s) - 3 and (s[pointer:pointer + 3] == 'dot'):
		email += '.'
		pointer += 3
	elif s[pointer] == 'a' and pointer < len(s) - 1 and (s[pointer:pointer + 2] == 'at') and at_not_used:
		email += '@'
		at_not_used = False
		pointer += 2
	else:
		email += s[pointer]
		pointer += 1
print(email)


import sys
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
input = sys.stdin.readline
t = 1
while t:
	t -= 1
	s = input().strip()
	a = s[1:-1].replace('dot', '.')
	a = a.replace('at', '@', 1)
	print(s[0] + a + s[-1])


st = input()
p = st[0]
st = st[1:].replace('dot', '.')
st = p + st
if st[-1] == '.':
	st = st[:-1] + 'dot'
p = st[0]
st = st[1:].replace('at', '@', 1)
if st[-1] == '@':
	st = st[:-1] + 'at'
print(p + st)


s = list(input())
i = 1
c = 0
while i < len(s) - 3:
	if s[i] + s[i + 1] + s[i + 2] == 'dot':
		s[i] = '.'
		s[i + 1] = ''
		s[i + 2] = ''
		i += 1
	elif s[i] == 'a' and s[i + 1] == 't' and (c == 0):
		s[i] = '@'
		s[i + 1] = ''
		c = 1
	i += 1
if s[i] == 'a' and s[i + 1] == 't' and (c == 0):
	s[i] = '@'
	s[i + 1] = ''
print(''.join(s))


from sys import stdin
input = stdin.readline
voiceEmail = input()
dotReplaced = voiceEmail[1:len(voiceEmail) - 2].replace('dot', '.')
voiceEmail = voiceEmail[0] + dotReplaced + voiceEmail[len(voiceEmail) - 2:]
atReplaced = voiceEmail[1:len(voiceEmail) - 2].replace('at', '@', 1)
voiceEmail = voiceEmail[0] + atReplaced + voiceEmail[len(voiceEmail) - 2:]
print(voiceEmail)


import re
import sys
exit = sys.exit
from bisect import bisect_left as bsl, bisect_right as bsr
from collections import Counter, defaultdict as ddict, deque
from functools import lru_cache
cache = lru_cache(None)
from heapq import *
from itertools import *
from math import inf
from pprint import pprint as pp
enum = enumerate
ri = lambda : int(rln())
ris = lambda : list(map(int, rfs()))
rln = sys.stdin.readline
rl = lambda : rln().rstrip('\n')
rfs = lambda : rln().split()
cat = ''.join
catn = '\n'.join
mod = 1000000007
d4 = [(0, -1), (1, 0), (0, 1), (-1, 0)]
d8 = [(-1, -1), (0, -1), (1, -1), (-1, 0), (1, 0), (-1, 1), (0, 1), (1, 1)]

def solve():
	s = rl()
	t = s[1:-1]
	t = t.replace('at', '@', 1)
	t = t.replace('dot', '.')
	return s[0] + t + s[-1]
print(solve())


import sys
inf = float('inf')
mod = 1000000007

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline()

def int1():
	return int(input())
import string
import math
from itertools import combinations

def main():
	l = input()
	j2 = len(l)
	s = list(l)
	s.pop()
	j = l[len(l) - 4:len(l) - 1]
	j3 = l.index('at')
	if j3 == 0:
		q4 = l[:j3 + 2]
		q5 = l[j3 + 2:]
		q5 = q5.replace('at', '@', 1)
		l = q4 + q5
	else:
		l = l.replace('at', '@', 1)
	if 'dot' in l:
		i = l.index('dot')
	else:
		i = 100000
	if l.count('dot') >= 1 and i != 0:
		l = l.replace('dot', '.')
	elif i == 0:
		l4 = l[:i + 3]
		l5 = l[i + 3:]
		l5 = l5.replace('dot', '.')
		l = l4 + l5
	if j == 'dot':
		l = l[:len(l) - 2] + 'dot'
	print(l)
main()


s = str(input())
l = [s[0]]
i = 1
flag = True
while i < len(s) - 2:
	if s[i:i + 3] == 'dot':
		l.append('.')
		i += 3
	elif s[i:i + 2] == 'at' and flag:
		l.append('@')
		flag = False
		i += 2
	else:
		l.append(s[i])
		i += 1
if s[-3:] == 'dot':
	l = l[:-1] + ['d', 'o', 't']
elif s[-4:-1] == 'dot':
	l += [s[-1]]
elif s[-3:-1] == 'at' and s.count('at') == 1:
	l += [s[-1]]
elif l[-1] == '@':
	l += [s[-2], s[-1]]
else:
	l += [s[-2], s[-1]]
print(''.join(l))


s = input()
if s[:3] == 'dot' or s[:2] == 'at' or s[len(s) - 2:] == 'at' or (s[len(s) - 3:] == 'dot'):
	if s[:3] == 'dot':
		t = s[3:]
		a = t.split('dot')
		l = '.'.join(a)
		b = l.find('at')
		o = l[:b] + '@' + l[b + 2:]
		q = 'dot' + o
		if q[-1] == '.':
			a = q[:len(q) - 1]
			s = a + 'dot'
		elif q[-1] == '@':
			a = q[:len(q) - 1]
			s = a + 'at'
		else:
			s = q
	if s[:2] == 'at':
		t = s[2:]
		a = t.split('dot')
		l = '.'.join(a)
		b = l.find('at')
		o = l[:b] + '@' + l[b + 2:]
		q = 'at' + o
		if q[-1] == '.':
			a = q[:len(q) - 1]
			s = a + 'dot'
		elif q[-1] == '@':
			a = q[:len(q) - 1]
			s = a + 'at'
		else:
			s = q
	if s[len(s) - 3:] == 'dot' and s[:3] != 'dot' and (s[:2] != 'at'):
		t = s[:len(s) - 3]
		a = t.split('dot')
		l = '.'.join(a)
		b = l.find('at')
		q = l[:b] + '@' + l[b + 2:]
		s = q + 'dot'
	if s[len(s) - 2:] == 'at' and s[:3] != 'dot' and (s[:2] != 'at'):
		t = s[:len(s) - 2]
		a = t.split('dot')
		l = '.'.join(a)
		b = l.find('at')
		q = l[:b] + '@' + l[b + 2:]
		s = q + 'at'
	print(s)
else:
	a = s.split('dot')
	l = '.'.join(a)
	b = l.find('at')
	q = l[:b] + '@' + l[b + 2:]
	print(q)


s = input()
t = s[0] + s[1:].replace('at', '@', 1)
s = t[0] + t[1:-1].replace('dot', '.') + t[-1]
print(s)


t = input()
t = t.replace('dot', '.')
t = t.replace('at', '@')
if t.find('.') == 0:
	t = t.replace('.', 'dot', 1)
if t.find('@') == 0:
	t = t.replace('@', 'at', 1)
if t.rfind('.') == len(t) - 1:
	t = t[0:len(t) - 1]
	t += 'dot'
if t.rfind('@') == len(t) - 1:
	t = t[0:len(t) - 1]
	t += 'at'
fir = t.find('@')
pref = t[0:fir + 1]
suf = t[fir + 1:]
suf = suf.replace('@', 'at')
print(pref + suf)


s = input()
s1 = s[0]
sm = s[len(s) - 1]
s = s1 + s[1:len(s) - 1].replace('dot', '.') + sm
for i in range(1, len(s) - 1):
	if s[i] == 'a' and s[i + 1] == 't':
		s = s[:i] + '@' + s[i + 2:]
		break
print(s)


from collections import deque, Counter, OrderedDict
from heapq import nsmallest, nlargest

def binNumber(n, size):
	return bin(n)[2:].zfill(size)

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def iar():
	return list(map(int, input().split()))

def ini():
	return int(input())

def isp():
	return map(int, input().split())

def sti():
	return str(input())
s = sti()
m = s[0]
i = 1
at = 0
while i < len(s):
	if i + 3 < len(s) and s[i:i + 3] == 'dot':
		m += '.'
		i += 3
	elif i + 2 < len(s) and s[i:i + 2] == 'at' and (at == 0):
		m += '@'
		i += 2
		at = 1
	else:
		m += s[i]
		i += 1
print(m)


s = input()
c1 = s[0]
c2 = s[-1]
s = s[1:-1]
s = s.replace('dot', '.')
s = s.replace('at', '@', 1)
print(c1 + s + c2)


em = input()
ind = em.find('at')
if ind == 0:
	d = 'es' + em[2:]
	ind = d.find('at')
p1 = em[0:ind]
p2 = em[ind + 2:]
lis1 = p1.split('dot')
lis2 = p2.split('dot')
s1 = s2 = str()
(ind, ind1) = (1, 0)
for i in lis1:
	if ind:
		if i == '':
			s1 += 'dot'
			ind1 = 1
		else:
			s1 += i
		ind = 0
	elif i == '':
		if ind1:
			ind1 = 0
			continue
		s1 += '.'
	else:
		if ind1:
			s1 += i
			ind1 = 0
			continue
		s1 += '.' + i
ind = 1
for i in lis2:
	if i == '':
		if ind:
			ind = 0
			continue
		s2 += '.'
	else:
		if ind:
			ind = 0
			s2 += i
			continue
		s2 += '.' + i
s = s1 + '@' + s2
if s[-1] == '.':
	s = s[0:len(s) - 1] + 'dot'
print(s)


s = input()
s = s.replace('at', '@', 1)
if s[0] == '@':
	s = 'at' + s[1:].replace('at', '@', 1)
if s.count('dot'):
	s = s.replace('dot', '.')
	if s[0] == '.':
		s = s.replace('.', 'dot', 1)
	if s[-1] == '.':
		s = s[:len(s) - 1] + 'dot'
print(s)


n = input()
b = n.find('at', 1)
n = n[:b] + '@' + n[b + 2:]
b = n.find('dot', 1)
while 0 < b < len(n) - 3:
	n = n[:b] + '.' + n[b + 3:]
	b = n.find('dot', b + 1)
print(n)


s = list(input())
i = 0
n = len(s)
i = 1
flag = 0
while i < n - 2:
	if i + 2 <= n - 1 and s[i:i + 2] == ['a', 't'] and (flag == 0):
		s.pop(i)
		s[i] = '@'
		flag = 1
		n = n - 1
	elif i + 3 <= n - 1 and s[i:i + 3] == ['d', 'o', 't']:
		s.pop(i)
		s.pop(i)
		s[i] = '.'
		n = n - 2
	i = i + 1
print(''.join(s))


str = input()
newStr = str[0] + str[1:].replace('at', '@', 1)
str = newStr[0] + newStr[1:-1].replace('dot', '.') + newStr[-1]
print(str)


s = input()
i = 1
if s == 'at':
	print('@')
	exit()
while i < len(s) - 3:
	sub = s[i:i + 3]
	if sub != 'dot':
		i += 1
		continue
	else:
		s = s[:i] + '.' + s[i + 3:]
		i = i + 1
i = 1
while i < len(s) - 1:
	sub = s[i:i + 2]
	if sub != 'at':
		i += 1
		continue
	else:
		s = s[:i] + '@' + s[i + 2:]
		break
print(s)


from sys import stdin, stdout
s = list(stdin.readline().strip())
i = 1
while i < len(s) - 3:
	if ''.join(s[i:i + 3]) == 'dot':
		s = s[:i] + ['.'] + s[i + 3:]
	i += 1
i = 1
while i < len(s) - 2:
	if ''.join(s[i:i + 2]) == 'at':
		s = s[:i] + ['@'] + s[i + 2:]
		break
	i += 1
stdout.write(''.join(s))


s = input()
if s[:2] == 'at':
	z = 2 + s[2:].index('at')
else:
	z = s.index('at')
s = s[:z] + '@' + s[z + 2:]
if s[:3] == 'dot':
	pr = 'dot'
	s = s[3:]
else:
	pr = ''
if s[-3:] == 'dot':
	po = 'dot'
	s = s[:-3]
else:
	po = ''
s = s.replace('dot', '.')
print(pr + s + po)


import sys
import math
import string
import operator
import functools
import fractions
import collections
sys.setrecursionlimit(10 ** 7)
dX = [-1, 1, 0, 0, -1, 1, -1, 1]
dY = [0, 0, -1, 1, 1, -1, -1, 1]
RI = lambda : list(map(int, input().split()))
RS = lambda : input().rstrip().split()
MAX = 1001
s = input().rstrip()
s = s[0] + s[1:-1].replace('dot', '.') + s[-1]
s = s[0] + s[1:-1].replace('at', '@', 1) + s[-1]
print(s)


s = input()
print(s[0] + s[1:len(s) - 1].replace('at', '@', 1).replace('dot', '.') + s[len(s) - 1])


s = input()
cnt = 0
gk = s.replace('at', '@')
gk = gk.replace('dot', '.')
n = len(gk)
k = list(gk)
if k[0] == '.':
	k[0] = 'dot'
if k[n - 1] == '.':
	k[n - 1] = 'dot'
if k[0] == '@':
	k[0] = 'at'
if k[n - 1] == '@':
	k[n - 1] = 'at'
for x in range(len(k)):
	if k[x] == '@' and cnt == 0:
		cnt = 1
	elif k[x] == '@':
		k[x] = 'at'
	print(k[x], end='')


a = input()
b = ''
c = False
while a:
	if a[:3] == 'dot':
		b += '.'
		a = a[3:]
	elif a[:2] == 'at' and (not c):
		b += '@'
		c = True
		a = a[2:]
	else:
		b += a[0]
		a = a[1:]
if b[0] == '.':
	b = 'dot' + b[1:]
if b[-1] == '.':
	b = b[:-1] + 'dot'
if b[0] == '@':
	b = b.replace('at', '@', 1)
	b = 'at' + b[1:]
print(b)


import os
import sys
from io import BytesIO, IOBase
import heapq as h
from bisect import bisect_left, bisect_right
import time
from types import GeneratorType
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		import os
		self.os = os
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			self.os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from collections import defaultdict as dd, deque as dq, Counter as dc
import math, string
start_time = time.time()

def getInts():
	return [int(s) for s in input().split()]

def getInt():
	return int(input())

def getStrs():
	return [s for s in input().split()]

def getStr():
	return input()

def listStr():
	return list(input())

def getMat(n):
	return [getInts() for _ in range(n)]

def isInt(s):
	return '0' <= s[0] <= '9'
MOD = 998244353

def solve():
	S = getStr()
	N = len(S)
	ans = ''
	at_flag = True
	i = 0
	while i < N:
		if S[i:i + 3] == 'dot' and i > 0 and (i < N - 3):
			ans += '.'
			i += 3
		elif S[i:i + 2] == 'at' and at_flag and (i > 0):
			ans += '@'
			at_flag = False
			i += 2
		else:
			ans += S[i]
			i += 1
	return ans
print(solve())


def is_dot(s, i):
	if i != 0 and i + 3 < len(s) and (s[i] == 'd') and (s[i + 1] == 'o') and (s[i + 2] == 't'):
		return True
	return False

def is_at(t, j):
	if j != 0 and j + 2 < len(t) and (t[j] == 'a') and (t[j + 1] == 't'):
		return True
	return False

def email(s):
	m = ''
	i = 0
	flag = 0
	while i < len(s):
		if is_dot(s, i):
			m += '.'
			i += 3
		elif is_at(s, i) and flag == 0:
			m += '@'
			flag = 1
			i += 2
		else:
			m += s[i]
			i += 1
	return m
print(email(input()))


d = 'dot'
R = str.replace
s = R(input(), d, '.')
s = s[0] + R(s[1:], 'at', '@', 1)
if s[0] == '.':
	s = d + s[1:]
if s[-1] == '.':
	s = s[:-1] + d
print(s)


from __future__ import division, print_function
from sys import stdin, stdout
import itertools, os, sys, threading
from collections import deque, Counter, OrderedDict, defaultdict
import heapq
from math import ceil, floor, log, sqrt, factorial, pow, pi, gcd
from fractions import Fraction

def ii():
	return int(input())

def si():
	return str(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def fii():
	return int(stdin.readline())

def fsi():
	return str(stdin.readline())

def fmi():
	return map(int, stdin.readline().split())

def fli():
	return list(fmi())
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000

def dfs(v, c):
	if visited[v]:
		if col[v] != c:
			print('-1')
			exit()
		return
	col[v] = c
	visited[v] = 1
	for i in graph[v]:
		dfs(i, c ^ 1)

def bfs(d, v):
	q = []
	q.append(v)
	visited[v] = 1
	while len(q) != 0:
		x = q[0]
		q.pop(0)
		for i in d[x]:
			if visited[i] != 1:
				visited[i] = 1
				q.append(i)
		print(x)

def make_graph(e):
	d = {}
	for i in range(e):
		(x, y) = mi()
		if x not in d.keys():
			d[x] = [y]
		else:
			d[x].append(y)
		if y not in d.keys():
			d[y] = [x]
		else:
			d[y].append(x)
	return d

def gr2(n):
	d = {}
	for i in range(n):
		(x, y) = mi()
		if x not in d.keys():
			d[x] = [y]
		else:
			d[x].append(y)
	return d

def connected_components(graph):
	seen = set()

	def dfs(v):
		vs = set([v])
		component = []
		while vs:
			v = vs.pop()
			seen.add(v)
			vs |= set(graph[v]) - seen
			component.append(v)
		return component
	ans = []
	for v in graph:
		if v not in seen:
			d = dfs(v)
			ans.append(d)
	return ans

def primeFactors(n):
	s = set()
	while n % 2 == 0:
		s.add(2)
		n = n // 2
	for i in range(3, int(sqrt(n)) + 1, 2):
		while n % i == 0:
			s.add(i)
			n = n // i
	if n > 2:
		s.add(n)
	return s

def find_all(a_str, sub):
	start = 0
	while True:
		start = a_str.find(sub, start)
		if start == -1:
			return
		yield start
		start += len(sub)
s = si()
m = s[0]
i = 1
at = 0
while i < len(s):
	if i + 3 < len(s) and s[i:i + 3] == 'dot':
		m += '.'
		i += 3
	elif i + 2 < len(s) and s[i:i + 2] == 'at' and (at == 0):
		m += '@'
		i += 2
		at = 1
	else:
		m += s[i]
		i += 1
print(m)


string = input()
while 'dot' in string[1:-1]:
	string = string[:string[1:].index('dot') + 1] + '.' + string[string[1:].index('dot') + 4:]
string = string[:string[1:].index('at') + 1] + '@' + string[string[1:].index('at') + 3:]
print(string)


t = input()
t = t[0] + t[1:-1].replace('dot', '.') + t[-1]
k = t.find('at', 1)
print(t[:k] + '@' + t[k + 2:])


s = input()
res_s = ''
if s[0:2] == 'at':
	s = s[2:]
	res_s += 'at'
elif s[0:3] == 'dot':
	s = s[3:]
	res_s += 'dot'
i = 0
n = len(s)
flag = False
while i != len(s):
	done = False
	try:
		if s[i:i + 2] == 'at' and i != n - 2 and (not flag):
			i += 2
			res_s += '@'
			flag = True
			done = True
		elif s[i:i + 3] == 'dot' and i != n - 3:
			i += 3
			res_s += '.'
			done = True
	except:
		pass
	if done:
		continue
	res_s += s[i]
	i += 1
print(res_s)


a = input()
b = a[1:len(a) - 1].replace('dot', '.')
b = a[0] + b
if len(a) != 1:
	b += a[-1]
k = b[1:len(b) - 1].replace('at', '@', 1)
k = b[0] + k
if len(b) != 1:
	k += b[-1]
print(k)


s = input()
i = s[1:].find('at') + 1
s = s[:i] + '@' + s[i + 2:]
while True:
	i = s[1:].find('dot')
	if i == -1:
		break
	i += 1
	if i + 3 == len(s):
		break
	s = s[:i] + '.' + s[i + 3:]
print(s)


ss = input()
em = ''
n = len(ss)
if n == 1:
	em = ss[0]
elif n == 2:
	em += ss[0]
	em += ss[1]
else:
	d = '.'
	a = '@'
	i = 0
	sd = 'dot'
	sa = 'at'
	cnt = 0
	while i < n:
		if i != 0 and i < n - 3 and (ss[i:i + 3] == sd):
			em += d
			i += 3
		elif i != 0 and i < n - 2 and (ss[i:i + 2] == sa) and (cnt == 0):
			em += str(a)
			cnt += 1
			i += 2
		else:
			em += str(ss[i])
			i += 1
print(em)


from collections import *
from math import *
from sys import *
s = input()
l = [s[0]]
n = len(s)
i = 1
flag = 0
while i < n:
	if i < n - 3 and s[i:i + 3] == 'dot':
		l.append('.')
		i += 3
	elif flag == 0 and i < n - 2 and (s[i:i + 2] == 'at'):
		l.append('@')
		i += 2
		flag = 1
	else:
		l.append(s[i])
		i += 1
print(''.join(l))


str = input().strip()
str = str[0] + str[1:].replace('at', '@', 1)
str = str[0] + str[1:-1].replace('dot', '.') + str[-1]
print(str)


import sys
from array import array

def input():
	return sys.stdin.buffer.readline().decode('utf-8')
s = input().rstrip()
ans = s[0]
suf = s[-1]
s = s[1:-1]
at_flag = 0
while s:
	if s[:3] == 'dot':
		ans += '.'
		s = s[3:]
	elif not at_flag and s[:2] == 'at':
		ans += '@'
		at_flag = 1
		s = s[2:]
	else:
		ans += s[0]
		s = s[1:]
print(ans + suf)


m = input()
m = m.replace('at', '@')
m = m.replace('dot', '.')
if m[0] == '.':
	m = 'dot' + m[1:]
if m[-1] == '.':
	m = m[:-1] + 'dot'
if m[0] == '@':
	m = 'at' + m[1:]
if m.count('@') > 1:
	n = m.find('@')
	m = m[:n + 1] + m[n + 1:].replace('@', 'at')
print(m)


import math
from itertools import *
s = input()
s = s.replace('at', '@', 1)
s = s.replace('dot', '.')
if s[0] == '.':
	s = s.replace('.', 'dot', 1)
if s[len(s) - 1] == '.':
	s = s[:len(s) - 1] + 'dot'
if s[0] == '@':
	s = s.replace('at', '@', 1)
	s = s.replace('@', 'at', 1)
print(s)


l = list(input())
j = 1
e = 0
while j < len(l) - 2:
	if l[j] == 'd' and l[j + 1] == 'o' and (l[j + 2] == 't') and (j < len(l) - 3):
		l[j] = '.'
		l[j + 1] = '0'
		l[j + 2] = '0'
		j += 3
	elif l[j] == 'a' and l[j + 1] == 't' and (e == 0):
		l[j] = '@'
		l[j + 1] = '0'
		j += 2
		e += 1
	else:
		j += 1
for i in range(len(l)):
	if l[i] != '0':
		print(l[i], end='')


a = input()
print(a[0] + a[1:len(a) - 1].replace('at', '@', 1).replace('dot', '.') + a[len(a) - 1])


n = input()
n = n[:1] + n[1:len(n) - 1].replace('at', '@', 1) + n[len(n) - 1:]
n = n[:1] + n[1:len(n) - 1].replace('dot', '.') + n[len(n) - 1:]
print(n)


x = input()
s = ''
s += x[0]
i = 1
k = 1
while i < len(x) - 3:
	if x[i] == 'a' and x[i + 1] == 't' and (k > 0):
		s += '@'
		i += 2
		k -= 1
	elif x[i] == 'd' and x[i + 1] == 'o' and (x[i + 2] == 't'):
		s += '.'
		i += 3
	else:
		s += x[i]
		i += 1
if x[i:len(x) - 1] == 'at' and k > 0:
	s += '@'
	i += 2
s += x[i:len(x)]
print(s)


import os
import sys
from math import *
from collections import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
s = input()
at = 1 + s[1:].index('at')
s = list(s)
s[at:at + 2] = ['@']
n = len(s)
for i in range(1, n):
	if s[i:i + 3] == ['d', 'o', 't']:
		if i != len(s) - 3:
			s[i:i + 3] = ['.']
print(*s, sep='')


n = input()
n = n.replace('dot', '.')
if n[0] == '.':
	n = 'dot' + n[1:]
if n[-1] == '.':
	n = n[0:-1] + 'dot'
n = n.replace('at', '@', 1)
if n[0] == '@':
	n = 'at' + n[1:].replace('at', '@', 1)
print(n)


s = input()
l = [i for i in s]
l.append('.')
l.append('.')
l.append('.')
n = len(s)
p = []
p.append(s[0])
i = 1
f = 0
while i < n:
	if s[i] == 'd' and s[i + 1] == 'o' and (s[i + 2] == 't'):
		p.append('.')
		i += 2
	elif f == 0 and s[i] == 'a' and (s[i + 1] == 't'):
		p.append('@')
		f = 1
		i += 1
	else:
		p.append(s[i])
	i += 1
if p[-1] == '.':
	p.pop()
	p.append('d')
	p.append('o')
	p.append('t')
print(''.join(p))


import re
s = input()
s = s[0] + re.sub('dot', '.', s[1:-1]) + s[-1]
s = s[0] + re.sub('at', '@', s[1:-1], count=1) + s[-1]
print(s)


s = input()
if s.count('at') >= 1:
	for i in range(2, len(s)):
		if s[i - 1:i + 1] == 'at':
			s = s[:i - 1] + '@' + s[i + 1:]
			break
if 'dot' in s:
	s = s[:1] + s[1:-1].replace('dot', '.') + s[-1:]
print(s)


import re
email = input()
first = re.sub('(?<!^)at(?!$)', '@', email, count=1)
second = re.sub('(?<!^)dot(?!$)', '.', first)
print(second)


def main():
	desc = input()
	chunk = desc[1:-1]
	chunk = chunk.replace('at', '@', 1)
	chunk = chunk.replace('dot', '.')
	print(desc[0] + chunk + desc[-1])
main()


s = input()
at = s.find('at', 1)
s = s[:at] + '@' + s[at + 2:]
pos = 1
while 1:
	ns = ''
	dot = s.find('dot', pos, -1)
	if dot == -1:
		break
	ns += s[:dot]
	ns += '.'
	pos = dot + 1
	ns += s[dot + 3:]
	s = ns
print(s)


l = list(input())
s = ''
s += l[0]
i = 1
d = 0
while i < len(l) - 1:
	if i + 2 < len(l) - 1 and l[i] == 'd' and (l[i + 1] == 'o') and (l[i + 2] == 't'):
		s += '.'
		i += 3
	elif i + 1 < len(l) - 1 and d == 0 and (l[i] == 'a') and (l[i + 1] == 't'):
		s += '@'
		i += 2
		d = 1
	else:
		s += l[i]
		i += 1
s += l[-1]
print(s)


a = input().strip()
a = a.replace('at', '@')
a = a.replace('dot', '.')
a = list(a)
if a[0] == '.':
	a[0] = 'dot'
if a[-1] == '.':
	a[-1] = 'dot'
if a[0] == '@':
	a[0] = 'at'
f = 0
for i in range(len(a)):
	if a[i] == '@' and f == 0:
		f = 1
	elif a[i] == '@' and f == 1:
		a[i] = 'at'
print(''.join(a))