#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 1;
map<char, long long> mp, pm;
map<long long, long long> hs;
deque<long long> v, vc, ve, vv, vd;
deque<char> p, pe;
deque<string> ts, ss, st;
deque<double> sd, ds;
long long a, b, c, d, e, f, cnt, ans, r, n, l, x, y;
long double q, t, cnt1, cnt2;
string g, h, w, o, m, s;
char z, u;
bool re, rt;
vector<pair<string, long long> > pr, rp, pp;
map<pair<char, char>, long long> aw, wa;
int main() {
  cin.tie(NULL);
  cout.tie(NULL);
  ios_base::sync_with_stdio(0);
  cin >> a;
  vector<pair<string, pair<long long, pair<long long, long long> > > > vec;
  for (long long i = 0; i < a; i++) {
    cin >> b >> g;
    mp.clear();
    pm.clear();
    for (long long j = 0; j < b; j++) {
      cin >> s;
      v.clear();
      for (long long k = 0; k < s.size(); k++) {
        if (s[k] != '-') v.push_back(int(s[k]) - 48);
      }
      hs.clear();
      for (long long k = 0; k < v.size(); k++) hs[v[k]]++;
      if (hs[v[0]] == 6)
        mp['t']++;
      else {
        cnt = 10;
        ans = 0;
        for (long long k = 0; k < v.size(); k++) {
          if (v[k] < cnt)
            cnt = v[k];
          else {
            ans = 1;
            break;
          }
        }
        if (ans == 1)
          mp['p']++;
        else
          mp['g']++;
      }
    }
    vec.push_back({g, {mp['t'], {mp['p'], mp['g']}}});
  }
  cout << "If you want to call a taxi, you should call: ";
  vc.clear();
  for (long long i = 0; i < vec.size(); i++)
    pr.push_back({vec[i].first, vec[i].second.first}),
        vc.push_back(vec[i].second.first);
  sort(vc.rbegin(), vc.rend());
  cnt = vc[0];
  for (long long i = 0; i < pr.size(); i++) {
    if (pr[i].second == cnt) ss.push_back(pr[i].first);
  }
  for (long long i = 0; i < ss.size() - 1; i++) cout << ss[i] << ", ";
  cout << ss[ss.size() - 1] << ".";
  cout << endl;
  vc.clear();
  pr.clear();
  ss.clear();
  cout << "If you want to order a pizza, you should call: ";
  for (long long i = 0; i < vec.size(); i++)
    pr.push_back({vec[i].first, vec[i].second.second.second}),
        vc.push_back(vec[i].second.second.second);
  sort(vc.rbegin(), vc.rend());
  cnt = vc[0];
  for (long long i = 0; i < pr.size(); i++)
    if (pr[i].second == cnt) ss.push_back(pr[i].first);
  for (long long i = 0; i < ss.size() - 1; i++) cout << ss[i] << ", ";
  cout << ss[ss.size() - 1] << "." << endl;
  vc.clear();
  pr.clear();
  ss.clear();
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (long long i = 0; i < vec.size(); i++)
    pr.push_back({vec[i].first, vec[i].second.second.first}),
        vc.push_back(vec[i].second.second.first);
  sort(vc.rbegin(), vc.rend());
  cnt = vc[0];
  for (long long i = 0; i < pr.size(); i++)
    if (pr[i].second == cnt) ss.push_back(pr[i].first);
  for (long long i = 0; i < ss.size() - 1; i++) cout << ss[i] << ", ";
  cout << ss[ss.size() - 1] << "." << endl;
}
