#include <bits/stdc++.h>
using namespace std;
struct st {
  int t, p, g;
  char s[30];
} a[100];
int x[3];
int y[6];
int main() {
  int n, m, i, j, k;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d%s", &m, a[i].s);
    for (j = 0; j < m; j++) {
      scanf("%d-%d-%d", &x[0], &x[1], &x[2]);
      for (k = 0; k < 3; k++) {
        y[k * 2] = x[k] / 10;
        y[k * 2 + 1] = x[k] % 10;
      }
      for (k = 0; k < 5; k++)
        if (y[k] != y[k + 1]) break;
      if (k == 5) {
        a[i].t++;
        continue;
      }
      for (k = 0; k < 5; k++)
        if (y[k] <= y[k + 1]) break;
      if (k == 5)
        a[i].p++;
      else
        a[i].g++;
    }
  }
  vector<int> ans;
  int ma = a[0].t;
  ans.push_back(0);
  for (i = 1; i < n; i++) {
    if (a[i].t > ma) {
      ans.clear();
      ans.push_back(i);
      ma = a[i].t;
    } else if (a[i].t == ma) {
      ans.push_back(i);
    }
  }
  printf("If you want to call a taxi, you should call: ");
  printf("%s", a[ans[0]].s);
  for (i = 1; i < ans.size(); i++) printf(", %s", a[ans[i]].s);
  printf(".\n");
  ans.clear();
  ma = a[0].p;
  ans.push_back(0);
  for (i = 1; i < n; i++) {
    if (a[i].p > ma) {
      ans.clear();
      ans.push_back(i);
      ma = a[i].p;
    } else if (a[i].p == ma) {
      ans.push_back(i);
    }
  }
  printf("If you want to order a pizza, you should call: ");
  printf("%s", a[ans[0]].s);
  for (i = 1; i < ans.size(); i++) printf(", %s", a[ans[i]].s);
  printf(".\n");
  ans.clear();
  ma = a[0].g;
  ans.push_back(0);
  for (i = 1; i < n; i++) {
    if (a[i].g > ma) {
      ans.clear();
      ans.push_back(i);
      ma = a[i].g;
    } else if (a[i].g == ma) {
      ans.push_back(i);
    }
  }
  printf(
      "If you want to go to a cafe with a wonderful girl, you should call: ");
  printf("%s", a[ans[0]].s);
  for (i = 1; i < ans.size(); i++) printf(", %s", a[ans[i]].s);
  printf(".\n");
  return 0;
}
