#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
string s;
int n, r = 0;
int main() {
  cin >> s;
  n = s.size();
  for (int i = 1; i < n; i += 3) {
    if ('a' <= s[i] && s[i] <= 'z') {
      for (int j = 0; j < 2 * r; j++) putchar(32);
      printf("<%c>\n", s[i]);
      r++;
    } else if (s[i] == '/') {
      for (int j = 0; j < (r - 1) * 2; j++) putchar(32);
      printf("</%c>\n", s[i + 1]);
      i++;
      r--;
    }
  }
  return 0;
}
