#include <bits/stdc++.h>
using namespace std;
const int N = 1000 * 1000;
int tail, a[N];
int main() {
  int i, j, x;
  string s;
  cin >> s;
  x = s.size();
  for (i = 1; i < x; i += 3) {
    if (s[i] == '/') {
      i++;
      a[tail] = s[i] - 'a' + 1;
      a[tail] *= -1;
      tail++;
    } else {
      a[tail] = s[i] - 'a' + 1;
      tail++;
    }
  }
  int h = 0;
  for (i = 0; i < tail; i++) {
    int t;
    if (a[i] > 0)
      t = a[i] + 'a' - 1;
    else {
      a[i] *= -1;
      t = a[i] + 'a' - 1;
      t *= -1;
    }
    if (0 < t) {
      for (j = 0; j < 2 * h; j++) cout << ' ';
      cout << '<' << (char)t << '>' << endl;
      h++;
    } else {
      t *= -1;
      h--;
      for (j = 0; j < 2 * h; j++) cout << ' ';
      cout << '<' << '/' << (char)t << '>' << endl;
    }
  }
  return 0;
}
