#include <bits/stdc++.h>
using namespace std;
map<string, set<string> > a;
int main() {
  int n;
  cin >> n;
  string tmp;
  getline(cin, tmp);
  for (int i = 0; i < n; i++) {
    string read;
    getline(cin, read);
    int pos = 7;
    string name = "http://";
    while (pos < (int)read.size() and read[pos] != '/') {
      name += read[pos];
      pos++;
    }
    string q;
    for (; pos < (int)read.size(); pos++) {
      q += read[pos];
    }
    a[name].insert(q);
  }
  vector<pair<set<string>, string> > rel;
  for (auto i : a) {
    rel.push_back({i.second, i.first});
  }
  sort(rel.begin(), rel.end());
  int p = 0;
  vector<vector<string> > ans;
  for (int i = 1; i <= (int)rel.size(); i++) {
    if (i == (int)rel.size() or rel[i].first != rel[p].first) {
      if (i - p > 1) {
        vector<string> tmp;
        for (int j = p; j < i; j++) {
          tmp.push_back(rel[j].second);
        }
        ans.push_back(tmp);
      }
      p = i;
    }
  }
  cout << ans.size() << endl;
  for (auto i : ans) {
    for (auto j : i) cout << j << " ";
    cout << endl;
  }
  return 0;
}
