#include <bits/stdc++.h>
using namespace std;
pair<string, string> process(string address) {
  string hostname = "";
  int i, cnt = 0;
  for (i = 0; i < address.size(); ++i) {
    if (address[i] == '/') {
      cnt++;
    }
    if (cnt == 3) {
      break;
    }
    hostname += address[i];
  }
  string path = "";
  for (; i < address.size(); ++i) {
    path += address[i];
  }
  return make_pair(hostname, path);
}
int main() {
  int n;
  cin >> n;
  map<string, vector<string> > pages;
  for (int i = 0; i < n; ++i) {
    string address;
    cin >> address;
    pair<string, string> p = process(address);
    pages[p.first].push_back(p.second);
  }
  map<vector<string>, vector<string> > result;
  for (auto p : pages) {
    vector<string> q(p.second);
    sort(q.begin(), q.end());
    q.erase(unique(q.begin(), q.end()), q.end());
    result[q].push_back(p.first);
  }
  int cnt = 0;
  for (auto p : result) {
    if (p.second.size() > 1) {
      cnt++;
    }
  }
  cout << cnt << endl;
  for (auto p : result) {
    if (p.second.size() > 1) {
      for (auto hostname : p.second) {
        cout << hostname << ' ';
      }
      cout << endl;
    }
  }
}
