#include <bits/stdc++.h>
using namespace std;
int n;
vector<string> name;
vector<pair<string, int> > inp;
string s;
vector<pair<vector<int>, int> > key;
map<string, int> rmap;
vector<string> ans;
set<string> seen;
bool eq(int i, int j) {
  if (key[i].first.size() != key[j].first.size()) return 0;
  for (int c = 0; c < key[i].first.size(); c++)
    if (key[i].first[c] != key[j].first[c]) return 0;
  return 1;
}
int main() {
  cin >> n;
  int hc = 0;
  for (int c = 0; c < n; c++) {
    cin >> s;
    if (seen.count(s)) {
      n--;
      c--;
      continue;
    }
    seen.insert(s);
    int i = s.find("/", 7);
    string host, path;
    if (i == string::npos) {
      path = " ";
      host = s;
    } else {
      path = s.substr(i + 1);
      host = s.substr(0, i);
    }
    if (!rmap.count(host)) {
      rmap[host] = hc++;
      name.push_back(host);
    }
    inp.push_back({path, rmap[host]});
  }
  sort(inp.begin(), inp.end());
  key.resize(hc);
  for (int l = 0, u = 0, id = 0; l < n; l = u, id++) {
    while (u < n && inp[l].first == inp[u].first) u++;
    for (int i = l; i < u; i++) key[inp[i].second].first.push_back(id);
  }
  for (int i = 0; i < hc; i++) key[i].second = i;
  sort(key.begin(), key.end());
  for (int l = 0, u = 0; l < hc; l = u) {
    while (u < n && eq(l, u)) u++;
    s.clear();
    if (l + 1 < u) {
      for (int i = l; i < u; i++) {
        if (!s.empty()) s.push_back(' ');
        s.append(name[key[i].second]);
      }
      ans.push_back(s);
    }
  }
  cout << ans.size() << endl;
  for (string s : ans) cout << s << endl;
}
