#K62687. Capitalize Markdown Headings

    ID: 31587 Type: Default 1000ms 256MiB

Capitalize Markdown Headings

Capitalize Markdown Headings

You are given a markdown document as input. Your task is to convert the text of all headings into uppercase. A heading in markdown is defined as a line that starts with one or more '#' characters followed by a space and then text. If the heading has no text following the '#' characters (i.e. only "# " is present), leave it unchanged.

For example, if the input is:

# My heading

Then the correct output is:

# MY HEADING

Process the entire document line by line, convert the heading text to uppercase when applicable, and output the resulting markdown document.

inputFormat

The input consists of a markdown document provided through standard input (stdin). The document may span multiple lines.

outputFormat

Output the transformed markdown document to standard output (stdout) with all heading texts converted to uppercase as specified.

## sample
# My heading
# MY HEADING