#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.);
int main() {
  char st[666][5];
  char s[1001], s2[5];
  int h = 0, l = 0;
  cin >> s;
  for (int i = 0; s[i]; i++) {
    s2[l++] = s[i];
    if (s[i] == '>') {
      s2[l] = '\0';
      if (s2[1] == '/') {
        h--;
        for (int j = 0; j < h; j++) cout << "  ";
        cout << s2 << endl;
      } else {
        strcpy(st[h], s2);
        for (int j = 0; j < h; j++) cout << "  ";
        cout << s2 << endl;
        h++;
      }
      l = 0;
    }
  }
  return 0;
}
