#include <bits/stdc++.h>
using namespace std;
int dir1[8][2] = {1, 2, 2, 1, 2, -1, 1, -2, -1, 2, -2, 1, -1, -2, -2, -1};
int dir2[4][2] = {1, 0, 0, 1, -1, 0, 0, -1};
int dir3[8][2] = {1, 0, 0, 1, -1, 0, 0, -1, 1, 1, 1, -1, -1, 1, -1, -1};
int gcd(int x, int y) { return y == 0 ? x : gcd(y, x % y); }
bool Isleap(int year) {
  if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) return true;
  return false;
}
bool isPrime(int x) {
  if (x == 1)
    return false;
  else if (x == 2)
    return true;
  for (int i = 2; i <= sqrt(x * 1.0); ++i) {
    if (x % i == 0) return false;
  }
  return true;
}
int sqr(int x) { return x * x; }
int a[1000050];
int main() {
  string s;
  while (cin >> s) {
    int t = 0;
    for (int i = 0; i < s.size(); ++i) {
      if (s[i] == '<' && s[i + 1] != '/') {
        for (int j = 1; j <= 2 * t; ++j) cout << " ";
        t++;
        cout << s[i] << s[i + 1] << s[i + 2] << endl;
        i += 2;
      } else if (s[i] == '<' && s[i + 1] == '/') {
        t--;
        for (int j = 1; j <= 2 * t; ++j) cout << " ";
        cout << s[i] << s[i + 1] << s[i + 2] << s[i + 3] << endl;
        i += 3;
      }
    }
  }
  return 0;
}
