%{
#include <stdio.h>
%}

%%

[A-Z]+     { printf("Capital Word: %s\n", yytext); }
\n         ;  // Ignore newlines
.          ;  // Ignore all other characters

%%

int main() {
    printf("Enter a string: ");
    yylex(); // Invoke the lexical analyzer
    return 0;
}

int yywrap() {
    return 1;
}
