#include <bits/stdc++.h>
using namespace std;
map<string, set<string> > ma;
set<string> hostname;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  while (n--) {
    string s;
    cin >> s;
    int i = s.find("/", 7);
    if (i != -1) {
      string path = s.substr(i, s.size());
      string name = s.substr(0, i);
      ma[name].insert(path);
      hostname.insert(name);
    } else {
      ma[s].insert("lorem");
      hostname.insert(s);
    }
  }
  map<set<string>, vector<string> > ans;
  for (string s : hostname) {
    ans[ma[s]].emplace_back(s);
  }
  for (auto it = begin(ans); it != end(ans);) {
    if ((it->second).size() == 1) {
      ans.erase(it->first);
      it = begin(ans);
    } else
      ++it;
  }
  cout << ans.size() << '\n';
  for (auto [key, val] : ans) {
    for (string s : val) {
      cout << s << ' ';
    }
    cout << "\n";
  }
  return 0;
}
