#include <cctype>
#include <iostream>
#include <regex>
#include <string>
#include <vector>

template<typename F>
std::string reg_replace_callback(const std::regex& r, const std::string& s, F f) {
   std::vector<std::pair<std::string::const_iterator, std::string::const_iterator>> reemplazos;
   for (std::sregex_iterator ri(s.begin( ), s.end( ), r), rf; ri != rf; ++ri) {
      reemplazos.emplace_back((*ri)[0].first, (*ri)[0].second);
   }

   std::string res = s;
   for (auto it = reemplazos.rbegin( ); it != reemplazos.rend( ); ++it) {
      res.replace(res.begin( ) + (it->first - s.begin( )), res.begin( ) + (it->second - s.begin( )), f(std::string(it->first, it->second)));
   }
   return res;
}

std::string mayusculas(std::string s) {
   for (char& c : s) {
      c = std::toupper(c);
   }
   return s;
}

int main( ) {
   std::string s;
   std::regex r(R"((\w+(\.\w+)*)@\w+(\.\w+)*)");
   while (std::getline(std::cin, s)) {
      std::cout << reg_replace_callback(r, s, mayusculas) << "\n";
   }
}

/* Ejemplo de entrada:
hola correo@azc.uam.mx saludos
enviar mensaje,gato.naranja@michis.com,bye
ejemplo abc.xyz@dominio.com.
*/
