#include <bits/stdc++.h>
using namespace std;
set<int> s;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int a[n];
  int t[n], g[n], p[n], m = 0, m1 = 0;
  for (int i = 0; i < n; i++) {
    p[i] = 0;
    t[i] = 0;
    g[i] = 0;
  }
  string s[n];
  string s1;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> s[i];
    for (int j = 0; j < a[i]; j++) {
      m = 0;
      m1 = 0;
      cin >> s1;
      for (int c = 0; c < 8; c += 3) {
        if (c != 2 && c != 5) {
          if (s1[c] == s1[c + 1])
            m++;
          else if (s1[c] > s1[c + 1])
            m1++;
        }
      }
      if (s1[3] < s1[1]) m1++;
      if (s1[6] < s1[4]) m1++;
      if (s1[3] == s1[1]) m++;
      if (s1[6] == s1[4]) m++;
      if (m == 5)
        t[i] += 1;
      else if (m1 == 5)
        p[i] += 1;
    }
    g[i] = a[i] - (p[i] + t[i]);
  }
  int mx = 0, mx1 = 0, mx2 = 0, r = 0;
  for (int i = 0; i < n; i++) {
    mx = max(mx, t[i]);
    mx1 = max(mx1, g[i]);
    mx2 = max(mx2, p[i]);
  }
  int o = 0;
  cout << "If you want to call a taxi, you should call: ";
  for (int i = 0; i < n; i++) {
    if (o == 0) {
      if (t[i] == mx) {
        cout << s[i];
        o = 1;
      }
    } else {
      if (t[i] == mx) {
        cout << ", " << s[i];
        o = 1;
      }
    }
  }
  cout << "." << endl;
  int o1 = 0;
  cout << "If you want to order a pizza, you should call: ";
  for (int i = 0; i < n; i++) {
    if (o1 == 0) {
      if (p[i] == mx2) {
        cout << s[i];
        o1 = 1;
      }
    } else {
      if (p[i] == mx2) {
        cout << ", " << s[i];
        o1 = 1;
      }
    }
  }
  cout << "." << endl;
  int o2 = 0;
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int i = 0; i < n; i++) {
    if (o2 == 0) {
      if (g[i] == mx1) {
        cout << s[i];
        o2 = 1;
      }
    } else {
      if (g[i] == mx1) {
        cout << ", " << s[i];
        o2 = 1;
      }
    }
  }
  cout << "." << endl;
  return 0;
}
