#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool chkmin(T &a, const T &b) {
  return a > b ? a = b, 1 : 0;
}
template <typename T>
inline bool chkmax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
const int oo = 0x3f3f3f3f;
const int maxn = 100000, max0 = 20;
int n;
int tot = 0;
map<string, int> id;
map<string, long long> val;
set<long long> all[maxn + 5];
string name[maxn + 5];
long long a[maxn + 5];
map<long long, vector<int> > b;
int main() {
  srand(time(NULL));
  scanf("%d", &n);
  string s;
  for (int i = (0), _end_ = (n); i < _end_; ++i) {
    cin >> s;
    int p = find(s.begin() + 7, s.end(), '/') - s.begin();
    string pre = s.substr(0, p), nxt = s.substr(p);
    if (!id.count(pre)) name[id[pre] = tot++] = pre;
    if (!val.count(nxt)) {
      long long &tmp = val[nxt];
      tmp = 0;
      for (int i = (0), _end_ = (3); i < _end_; ++i) rand();
      for (int j = (0), _end_ = (64); j < _end_; ++j)
        if (rand() & 1) tmp |= 1LL << j;
    }
    all[id[pre]].insert(val[nxt]);
  }
  for (int i = (0), _end_ = (tot); i < _end_; ++i) {
    a[i] = 0;
    for (auto first : all[i]) a[i] ^= first;
  }
  for (int i = (0), _end_ = (tot); i < _end_; ++i) b[a[i]].push_back(i);
  int cnt = 0;
  for (auto first : b) cnt += (int((first.second).size())) > 1;
  printf("%d\n", cnt);
  for (auto first : b) {
    if ((int((first.second).size())) == 1) continue;
    for (auto second : first.second) {
      for (int k = (0), _end_ = ((int((name[second]).size()))); k < _end_; ++k)
        putchar(name[second][k]);
      putchar(' ');
    }
    putchar('\n');
  }
  return 0;
}
