#include <bits/stdc++.h>
using namespace std;
int main() {
  int q, w, e, r, t = -1, c;
  char a[1001];
  cin >> a;
  for (w = 0; a[w];) {
    w++;
    c = 0;
    if (a[w] == '/') {
      w++;
      c = 1;
    } else
      t++;
    for (e = 0; e < t; e++) printf("  ");
    printf("<");
    if (c) printf("/");
    printf("%c>", a[w]);
    w += 2;
    t -= c;
    printf("\n");
  }
  return 0;
}
