#include <bits/stdc++.h>
using namespace std;
long long int x[1000007], y[1000007], z[1000007], n;
string s, S;
vector<long long int> v;
void space(int p) {
  long long int i;
  for (i = 0; i < p; i++) cout << " ";
}
int main() {
  {
    long long int a = 0, b = 0, c = 0, d, e, f, g, i, j, k = 0, l, m, p, q, r,
                  u, w, t, tc, in, mod, loc, diff, val, sz, lo, hi, mid,
                  mn = 2134567891, mx = 0, sum = 0, ans = 0;
    cin >> s;
    n = s.size();
    for (i = 0; i < n; i++) {
      if (s[i] == '/') {
        if (k == 2) a -= 2;
        space(a);
        cout << "</" << s[++i] << ">\n";
        k = 2;
      } else if (s[i] != '<' && s[i] != '>') {
        if (k == 1) a += 2;
        space(a);
        cout << "<" << s[i++] << ">\n";
        ;
        k = 1;
      }
    }
  }
  return 0;
}
