#include <bits/stdc++.h>
char c;
void consumirInteiro() {
  while (c >= '0' && c <= '9') {
    printf("%c", c);
    c = getchar();
  }
}
void consumirDots() {
  for (int i = 0; i < 3; i++) c = getchar();
  printf("...");
}
int main() {
  char space = 0;
  c = getchar();
  while (c != '\n') {
    if (c >= '1' && c <= '9') {
      consumirInteiro();
      space = 1;
      break;
    } else if (c == '.') {
      consumirDots();
      space = 0;
      break;
    } else if (c == ',') {
      printf(",");
      c = getchar();
      space = 2;
      break;
    }
    c = getchar();
  }
  while (c != '\n') {
    if (c >= '1' && c <= '9') {
      if (space) printf(" ");
      consumirInteiro();
      space = 1;
    } else if (c == '.') {
      printf(" ");
      consumirDots();
      space = 0;
    } else if (c == ',') {
      if (space == 2)
        printf(" ,");
      else
        printf(",");
      c = getchar();
      space = 2;
    } else
      c = getchar();
  }
  puts("");
  return 0;
}
