#include <bits/stdc++.h>
using namespace std;
void space(int a) {
  for (int i = 0; i < 2 * a; i++) cout << " ";
}
int main() {
  string s;
  cin >> s;
  int open = 0, end = 0, i;
  for (i = 0; i < s.size();) {
    if (s[i] == '<' && s[i + 1] == '/' && (i + 1) < s.size()) {
      end++;
      i += 2;
    } else if (s[i] == '<' && s[i + 1] != '/' && (i + 1) < s.size()) {
      open++;
      i++;
    } else if (s[i] >= 'a' && s[i] <= 'z' && i != 1 && i != (s.size() - 2)) {
      int h = (open - end);
      if (s[i - 1] == '/') {
        space(h);
        cout << s[i - 2] << s[i - 1] << s[i] << s[i + 1] << endl;
      } else {
        space(h - 1);
        cout << s[i - 1] << s[i] << s[i + 1] << endl;
      }
      i += 2;
    } else if (i == 1) {
      cout << s[i - 1] << s[i] << s[i + 1] << endl;
      i += 2;
    } else if (i == (s.size() - 2)) {
      cout << s[i - 2] << s[i - 1] << s[i] << s[i + 1] << endl;
      i += 2;
    }
  }
}
