#include <bits/stdc++.h>
using namespace std;
map<string, set<string> > mp;
map<set<string>, vector<string> > ans;
int main() {
  ios::sync_with_stdio(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    string st;
    cin >> st;
    st += '/';
    string t = st.substr(0, st.find("/", 7)), tt = st.substr(st.find("/", 7));
    mp[t].insert(tt);
  }
  for (auto& it : mp) {
    ans[it.second].push_back(it.first);
  }
  int k = 0;
  for (auto& it : ans) {
    if (it.second.size() > 1) ++k;
  }
  cout << k << "\n";
  for (auto& it : ans) {
    if (it.second.size() < 2) continue;
    for (int j = 0; j < it.second.size(); ++j) {
      cout << it.second[j] << " ";
    }
    cout << "\n";
  }
}
