#include <bits/stdc++.h>
using namespace std;
const int M = 1050;
char str[M];
int main(void) {
  scanf("%s", str);
  int h = 0;
  char *ps = str;
  bool flag = false;
  while (*ps != '\0') {
    for (int i = 0; i < 2 * h; i++) printf("%c", ' ');
    while (*ps != '>') printf("%c", *ps++);
    printf("%c\n", *ps++);
    if (flag) {
      h--;
      flag = false;
    }
    char *ts = ps;
    if (*ts == '<') ts++;
    if (*ts == '/')
      flag = true;
    else
      h++;
  }
  return 0;
}
