#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e11 + 5;
mt19937_64 rnd(69420);
map<string, long long> code;
map<string, long long> codeSum;
map<string, set<long long>> used;
map<long long, vector<string>> sum2Names;
long long encode(string &s) {
  if (code.count(s) == false) {
    long long val = rnd() % inf;
    code[s] = val;
    return val;
  }
  return code[s];
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int answer = 0;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    int index = 7;
    string hostname = "", path = "";
    for (; index < s.size(); index++) {
      if (s[index] == '/') break;
      hostname += s[index];
    }
    for (; index < s.size(); index++) {
      path += s[index];
    }
    long long val = encode(path);
    if (used[hostname].count(val) == false) {
      codeSum[hostname] += val;
      used[hostname].insert(val);
    }
  }
  for (auto it = codeSum.begin(); it != codeSum.end(); it++) {
    sum2Names[it->second].push_back(it->first);
    if (sum2Names[it->second].size() == 2) answer++;
  }
  cout << answer << '\n';
  for (auto it = sum2Names.begin(); it != sum2Names.end(); it++) {
    if (it->second.size() < 2) continue;
    for (string s : it->second) {
      cout << "http://" << s << " ";
    }
    cout << '\n';
  }
}
