#include <bits/stdc++.h>
int numdivide;
void func(char str[]) {
  int i = 0;
  char temp[200000] = "";
  char compare[200000] = "";
  char cbuff;
  while ((cbuff = str[i]) != '\0') {
    sprintf(compare, "%s%c", compare, cbuff);
    if (strcmp(temp, compare)) {
      printf("%s,%s\n", temp, compare);
      numdivide++;
      strcpy(temp, compare);
      compare[0] = '\0';
    }
    i++;
  }
}
int main(void) {
  int c;
  int i = 0;
  char strinput[200000];
  while ((c = getchar()) != EOF) {
    strinput[i] = c;
    printf("%c", c);
    i = i + 1;
  }
  strinput[i] = '\0';
  func(strinput);
  printf("%d", numdivide - 1);
  return 0;
}
