By inserting this regex in a programming language to test it against Codeforces 1800A you'll solve the task