#include <stdio.h>
void rcomment (int c);
void in_comment_one (void);
void in_comment_two (void);
void echo_quote (int c);
int main(void)
{
int c;
while ((c = getchar()) != EOF)
rcomment(c);
return 0;
}
void rcomment (int c)
{
int d;
if (c == '/')
if ((d = getchar()) == '*')
in_comment_one();
else if (d == '/')
{
in_comment_two();
}
else
{
putchar(c);
putchar(d);
}
else if (c == '\'' || c == '"')
echo_quote (c);
else
putchar (c);
}
void in_comment_one (void)
{
int c, d;
c = getchar();
d = getchar();
while (c != '*' || d != '/')
{
c = d;
d = getchar();
}
}
void in_comment_two (void)
{
int c;
c = getchar();
while (c != '\n')
{
c = getchar();
}
ungetc(c, stdin);
}
void echo_quote (int c)
{
int d;
putchar (c);
while ((d = getchar()) != c)
{
putchar (d);
if (d == '\\')
putchar (getchar());
}
putchar (d);
}