#include <bits/stdc++.h>
using namespace std;
long long rdtsc() {
  long long tmp;
  asm("rdtsc" : "=A"(tmp));
  return tmp;
}
inline int myrand() { return abs((rand() << 15) ^ rand()); }
inline int rnd(int x) { return myrand() % x; }
const int INF = (int)1.01e9;
const long double EPS = 1e-9;
const long double PI = acos(-1.0L);
void precalc() {}
int n;
map<string, vector<string> > tree;
bool read() {
  if (scanf("%d", &n) < 1) {
    return 0;
  }
  tree.clear();
  for (int i = 0; i < n; ++i) {
    string s;
    cin >> s;
    assert(((int)(s).size()) >= 7 && string(s, 0, 7) == "http://");
    int pos = find(s.begin() + 7, s.end(), '/') - s.begin();
    string name = string(s, 0, pos);
    s = string(s, pos);
    tree[name].push_back(s);
  }
  return 1;
}
void solve() {
  vector<pair<vector<string>, string> > tosort;
  for (auto iter = tree.begin(); iter != tree.end(); ++iter) {
    const string &name = iter->first;
    auto vec = iter->second;
    sort(vec.begin(), vec.end());
    vec.resize(unique(vec.begin(), vec.end()) - vec.begin());
    tosort.push_back(make_pair(vec, name));
  }
  sort(tosort.begin(), tosort.end());
  vector<vector<string> > ans;
  for (int i = 0; i < ((int)(tosort).size());) {
    int i0 = i;
    vector<string> cur;
    while (i < ((int)(tosort).size()) && tosort[i].first == tosort[i0].first) {
      cur.push_back(tosort[i].second);
      ++i;
    }
    if (((int)(cur).size()) > 1) {
      ans.push_back(cur);
    }
  }
  printf("%d\n", ((int)(ans).size()));
  for (int i = 0; i < ((int)(ans).size()); ++i) {
    for (int j = 0; j < ((int)(ans[i]).size()); ++j) {
      printf("%s%c", ans[i][j].c_str(), " \n"[j == ((int)(ans[i]).size()) - 1]);
    }
  }
}
int main() {
  srand(rdtsc());
  precalc();
  while (1) {
    if (!read()) {
      break;
    }
    solve();
  }
  return 0;
}
