#include <bits/stdc++.h>
using namespace std;
long long isPrime(long long n);
vector<bool> siev();
long long gcd(long long n1, long long n2);
long long lcm(long long n1, long long n2);
int dec(string n) {
  vector<long long> num;
  for (int i = 0; i < 8; i++) {
    if (n[i] == '-') {
      continue;
    }
    num.push_back((long long)(n[i] - '0'));
  }
  bool same = 1, de = 1;
  for (int i = 1; i < 6; i++) {
    if (num[i] < num[i - 1]) {
      same = 0;
    }
    if (num[i] == num[i - 1]) {
      de = 0;
    }
    if (num[i] > num[i - 1]) {
      de = 0;
      same = 0;
    }
  }
  if (same) {
    return 0;
  } else if (de) {
    return 1;
  } else {
    return 2;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  int grid[t][3];
  for (int i = 0; i < t; i++) {
    for (int j = 0; j < 3; j++) {
      grid[i][j] = 0;
    }
  }
  int mx[3] = {-1, -1, -1};
  vector<string> names;
  for (int i = 0; i < t; i++) {
    long long n;
    cin >> n;
    if (n == 0) {
      grid[i][0] = 0;
      grid[i][1] = 0;
      grid[i][2] = 0;
    }
    string name;
    cin >> name;
    names.push_back(name);
    for (int j = 0; j < n; j++) {
      string number;
      cin >> number;
      int type = dec(number);
      grid[i][type]++;
      mx[type] = max(mx[type], grid[i][type]);
    }
    mx[0] = max(mx[0], 0);
    mx[1] = max(mx[1], 0);
    mx[2] = max(mx[2], 0);
  }
  vector<string> taxi, pizza, girls;
  for (int i = 0; i < t; i++) {
    if (grid[i][0] == mx[0]) {
      taxi.push_back(names[i]);
    }
    if (grid[i][1] == mx[1]) {
      pizza.push_back(names[i]);
    }
    if (grid[i][2] == mx[2]) {
      girls.push_back(names[i]);
    }
  }
  string ftaxi = "", fpizza = "", fgirls = "";
  for (int i = 0; i < taxi.size(); i++) {
    if (i == taxi.size() - 1) {
      ftaxi += taxi[i];
      ftaxi += ".";
    } else {
      ftaxi += taxi[i];
      ftaxi += ", ";
    }
  }
  for (int i = 0; i < pizza.size(); i++) {
    if (i == pizza.size() - 1) {
      fpizza += pizza[i];
      fpizza += ".";
    } else {
      fpizza += pizza[i];
      fpizza += ", ";
    }
  }
  for (int i = 0; i < girls.size(); i++) {
    if (i == girls.size() - 1) {
      fgirls += girls[i];
      fgirls += ".";
    } else {
      fgirls += girls[i];
      fgirls += ", ";
    }
  }
  cout << "If you want to call a taxi, you should call: " << ftaxi << '\n';
  cout << "If you want to order a pizza, you should call: " << fpizza << '\n';
  cout << "If you want to go to a cafe with a wonderful girl, you should call: "
       << fgirls;
}
long long gcd(long long n1, long long n2) {
  long long a = max(n1, n2), b = min(n1, n2);
  while (a % b != 0) {
    long long temp = b;
    b = a % b;
    a = temp;
  }
  return b;
}
long long lcm(long long n1, long long n2) { return (n2 * n1) / gcd(n1, n2); }
vector<bool> siev() {
  vector<bool> siv(100005, 1);
  for (long long i = 2; i * i <= 100005; i++) {
    if (siv[i] == 1) {
      for (long long j = i * i; j <= 100005; j += i) {
        siv[j] = 0;
      }
    }
  }
  siv[0] = 0;
  siv[1] = 0;
  return siv;
}
long long isPrime(long long n) {
  if (n == 1) {
    return 1;
  }
  if (n == 2) {
    return 0;
  }
  int divs = 0;
  for (int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      divs++;
    }
  }
  if (divs > 0) {
    return 1;
  } else {
    return 0;
  }
}
