#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100030;
const long long MODD = 1000000009;
map<string, vector<string> > M;
void do_case() {
  int n;
  string s;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> s;
    s = s.substr(7);
    if (s.find('/') == string::npos) {
      M[s].push_back("");
      continue;
    }
    int idx = s.find('/');
    string host = s.substr(0, idx);
    string path = s.substr(idx);
    M[host].push_back(path);
  }
  unordered_map<string, vector<string> > M2;
  for (const auto& x : M) {
    set<string> S(x.second.begin(), x.second.end());
    string val;
    for (const auto& y : S) val += string("$") + y;
    M2[val].push_back(x.first);
  }
  int ans = 0;
  for (const auto& x : M2)
    if (x.second.size() >= 2) ans++;
  cout << ans << endl;
  for (const auto& x : M2)
    if (x.second.size() >= 2) {
      for (const auto& y : x.second) cout << "http://" << y << " ";
      cout << endl;
    }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  do_case();
  return 0;
}
