A payment service logs the full request message for debugging, including whatever text was submitted.
The bug: log files routinely have weaker access controls than the production database, get shipped to third-party log aggregators, and are kept far longer than necessary — logging a full credit card number is a direct path to a compliance violation and a data breach.
Your task: fix solve(message) so any 16-digit credit card number in the message (with or without spaces/dashes grouping the digits in 4s) is replaced with **** **** **** followed by only the last 4 digits. Text with no card number is returned unchanged.
Sample tests