#include <bits/stdc++.h>
int main() {
  int num;
  std::string fa = "Hoshino";
  std::string tr = "Hoshina";
  std::string english;
  std::cin >> num;
  for (int i = 0; i < num; i++) {
    std::cin >> english;
    for (int j = 0; j < english.length(); j++) {
      if (english[j] == false) english[j] = true;
    }
    std::cout << english;
  }
  return 0;
}
