#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  string s;
  cin >> s;
  long long n = s.size();
  long long k = -2, m = 0;
  for (long long i = 0; i < n; i += 3) {
    if (s[i + 1] == '/' && m == 0) {
      m = 1;
    } else if (s[i + 1] == '/' && m) {
      k -= 2;
    } else if (m == 1) {
      m = 0;
    } else {
      k += 2;
      m = 0;
    }
    for (long long j = 0; j < k; j++) {
      cout << " ";
    }
    if (s[i + 1] == '/') {
      cout << s[i] << s[i + 1] << s[i + 2] << s[i + 3] << endl;
      i++;
    } else {
      cout << s[i] << s[i + 1] << s[i + 2] << endl;
    }
  }
  return 0;
}
