input: n = int(input())
  p = ''
  for i in range(n):
      s = str(input())
      t = ''
      for element in s:
          ha element.isupper()vagy element.isnumeric():
              t += element
      if len(t) > 1:
          t = ''
      p += t
  print(p)
instruction: Írjuk át ezt C++ nyelven.
output: ```
  #include <iostream>
  #include <string>
  using namespace std;
  
  int main() {
      int n;
      string p = "";
      cin >> n;
      for (int i = 0; i < n; i++) {
          string s;
          cin >> s;
          string t = "";
          for (char element : s) {
              if (isupper(element) || isdigit(element)) {
                  t += element;
              }
          }
          if (t.size() > 1) {
              t = "";
          }
          p += t;
      }
      cout << p;
      return 0;
  }
  ```