#include <bits/stdc++.h>
using namespace std;
int n;
string s[200];
pair<int, int> a[200], b[200], c[200];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    int m;
    cin >> m;
    cin >> s[n - i - 1];
    a[i].second = n - i - 1;
    b[i].second = n - i - 1;
    c[i].second = n - i - 1;
    for (int j = 0; j < m; j++) {
      string p;
      cin >> p;
      bool e = false;
      string o = p.substr(0, 2) + p.substr(3, 2) + p.substr(6, 2);
      for (int k = 1; k < 6; k++)
        if (o[k] >= o[k - 1]) e = true;
      if (!e) {
        b[i].first += 1;
        continue;
      }
      sort(o.begin(), o.end());
      if (o[0] == o[5]) {
        a[i].first += 1;
        continue;
      }
      c[i].first += 1;
    }
  }
  sort(b, b + n);
  reverse(b, b + n);
  sort(a, a + n);
  reverse(a, a + n);
  sort(c, c + n);
  reverse(c, c + n);
  cout << "If you want to call a taxi, you should call:";
  for (int i = 0; a[i].first == a[0].first && i < n; i++) {
    cout << " " << s[a[i].second];
    if (a[i + 1].first == a[0].first && i + 1 < n)
      cout << ",";
    else
      cout << "." << endl;
  }
  cout << "If you want to order a pizza, you should call:";
  for (int i = 0; b[i].first == b[0].first && i < n; i++) {
    cout << " " << s[b[i].second];
    if (b[i + 1].first == b[0].first && i + 1 < n)
      cout << ",";
    else
      cout << "." << endl;
  }
  cout << "If you want to go to a cafe with a wonderful girl, you should call:";
  for (int i = 0; c[i].first == c[0].first && i < n; i++) {
    cout << " " << s[c[i].second];
    if (c[i + 1].first == c[0].first && i + 1 < n)
      cout << ",";
    else
      cout << "." << endl;
  }
}
