#include <stdio.h>
#include <stdlib.h>
#include <string.h>



int regex_match(const char *pattern, const char *text) {
    // TODO: implement recursive matching for literals, '.', 'c*', '^' and '$'.
    //       A helper match_here(p, t) that matches pattern p at position t,
    //       plus a match_star helper for the '*' case, works well.
    (void)pattern;
    (void)text;
    return 0;
}


int main(void) {
    char line[1024];
    while (fgets(line, sizeof(line), stdin) != NULL) {
        size_t len = strlen(line);
        while (len > 0 && (line[len-1] == '\n' || line[len-1] == '\r')) line[--len] = '\0';
        if (len == 0) continue;
        char *sp = strchr(line, ' ');
        char *pattern = line;
        char *text = "";
        if (sp != NULL) { *sp = '\0'; text = sp + 1; }
        printf("%s ~ \"%s\": %s\n", pattern, text,
               regex_match(pattern, text) ? "match" : "no match");
    }
    return 0;
}
