#include <bits/stdc++.h>
using namespace std;
const int maxn = 1005;
char ch[maxn];
int main() {
  while (~scanf("%s", ch)) {
    int h = -1, n = strlen(ch);
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < h; j++) cout << "  ";
      if (ch[i + 1] != '/') {
        if (h >= 0) cout << "  ";
        h++;
      } else
        h--;
      for (; ch[i] != '>'; i++) cout << ch[i];
      cout << ">\n";
    }
  }
  return 0;
}
