#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e9;
const long long SZ = 2000010;
const double PI = 3.1415926535897932384626433832795;
const double EPS = 1e-6;
const long long MUL = 239017;
string a, b1, b2;
map<string, vector<string>> d;
map<vector<string>, vector<string>> rd;
set<string> x;
int main() {
  srand(330699524);
  ios::sync_with_stdio(false);
  cout.precision(20);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    a += '/';
    int m = 0;
    b1 = b2 = "";
    for (char i : a) {
      if (i == '/') m++;
      if (m < 3)
        b1 += i;
      else
        b2 += i;
    }
    b2.pop_back();
    d[b1].push_back(b2);
  }
  for (auto &i : d) {
    x.clear();
    for (string j : i.second) x.insert(j);
    i.second.clear();
    for (string j : x) i.second.push_back(j);
    rd[i.second].push_back(i.first);
  }
  int ans = 0;
  for (auto i : rd)
    if (i.second.size() > 1) ans++;
  cout << ans << "\n";
  for (auto i : rd)
    if (i.second.size() > 1) {
      for (string j : i.second) cout << j << " ";
      cout << "\n";
    }
  return 0;
}
