#include <bits/stdc++.h>
using namespace std;
char str[1234];
struct list {
  int p;
  bool f;
  char c;
} l[1024];
int main() {
  while (gets(str)) {
    int p = 0, cnt = 0, t;
    bool flag = true;
    int len = strlen(str);
    for (int i = 0; i < len; i++) {
      if (str[i] == '<') {
        continue;
      } else if (str[i] == '>') {
        if (flag) p += 2;
        flag = true;
      } else if (str[i] == '/') {
        flag = false;
        p -= 2;
      } else {
        l[cnt].p = p;
        l[cnt].f = flag;
        l[cnt].c = str[i];
        cnt++;
      }
    }
    for (int i = 0; i < cnt; i++) {
      for (int j = 0; j < l[i].p; j++) {
        printf(" ");
      }
      if (l[i].f)
        printf("<%c>\n", l[i].c);
      else
        printf("</%c>\n", l[i].c);
    }
  }
  return 0;
}
