#include <bits/stdc++.h>
using namespace std;
const long long OO = (long long)5e3 + 555;
void ndr() { ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); }
int divi(long long N) {
  int cnt(0);
  for (long long i = 1; i <= sqrt(N); i++) {
    if (N % i == 0) {
      if (N / i == i)
        cnt++;
      else
        cnt += 2;
    }
  }
  return cnt;
}
bool cp(int x, int y) { return x > y; }
unsigned long long numberOfSetBits(long long i) {
  i = i - ((i >> 1) & 0x55555555);
  i = (i & 0x33333333) + ((i >> 2) & 0x33333333);
  return (((i + (i >> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24;
}
bool Taxi(string X) {
  for (long long i = (long long)1; i < (long long)X.size(); i++) {
    if (X[i] != X[i - 1]) return false;
  }
  return true;
}
bool Pizza(string X) {
  for (long long i = (long long)1; i < (long long)X.size(); i++) {
    if (X[i] >= X[i - 1]) return false;
  }
  return true;
}
signed main() {
  ndr();
  vector<multimap<int, string>> Phone_Numbers(3);
  multimap<int, string>::iterator it, it1;
  int Friends;
  cin >> Friends;
  while (Friends--) {
    int N;
    cin >> N;
    string S;
    cin >> S;
    int taxi = 0, pizza = 0, girl = 0;
    while (N--) {
      string s;
      cin >> s;
      for (long long i = (long long)0; i < (long long)s.size(); i++)
        if (s[i] == '-') {
          s.erase(s.begin() + i);
          i--;
        }
      if (Taxi(s))
        taxi++;
      else if (Pizza(s))
        pizza++;
      else
        girl++;
    }
    Phone_Numbers[0].insert({taxi, S});
    Phone_Numbers[1].insert({pizza, S});
    Phone_Numbers[2].insert({girl, S});
  }
  for (long long i = (long long)0; i < (long long)3; i++) {
    if (i == 0)
      cout << "If you want to call a taxi, you should call:";
    else if (i == 1)
      cout << "If you want to order a pizza, you should call:";
    else
      cout << "If you want to go to a cafe with a wonderful girl, you should "
              "call:";
    it1 = Phone_Numbers[i].end();
    --it1;
    for (it = Phone_Numbers[i].lower_bound(it1->first);; it++) {
      if (it == it1) {
        cout << " " << it->second << "." << endl;
        break;
      } else
        cout << " " << it->second << ",";
    }
  }
  return 0;
}
