print((function (s1, s2) return string.format("(%s%s%s)/", s1, s2, s1) end)(io.stdin:read("*l"), io.stdin:read("*l")))