//---------------------------------------------------------------------------
#include
void mwd(char *a)
{
int i,m,la,lb;
la=lb=0;
for (i = 0; a[i]!='\0'; i++) {
if (a[i]!=' ') {
la++;
}
else if (lb==0) {
lb=la;
}
else {
lb=lb
}
m=i-lb;
}
for (i=m-1; a[i]!=' '&&a[i]!='\0'; i++) {
putchar(a[i]);
}
}
int main(int argc, char* argv[])
{
char c[50];
gets(c);
mwd(c);
return 0;
}
//---------------------------------------------------------------------------