#include <bits/stdc++.h>
using namespace std;
const int N = 10000;
int tag[N];
string str;
int n;
void print(int n) {
  for (int i = 0; i < 2 * n; ++i) printf(" ");
}
void solve(int pos, int h) {
  if (pos >= n) return;
  if (str[pos + 2] == '>') {
    print(h);
    cout << str.substr(pos, 3) << endl;
    solve(pos + 3, h + 1);
  } else {
    print(h - 1);
    cout << str.substr(pos, 4) << endl;
    solve(pos + 4, h - 1);
  }
}
int main() {
  cin >> str;
  n = (int)str.size();
  solve(0, 0);
  return 0;
}
