Amazon Shopping recently launched a new Coin Collection Album. Each page has a coin pasted on it, with either the head or tail side facing upward, represented by 'H'and 'T' respectively. A sequence of coins is called beautiful if all the head-facing coins are pasted before all the tail-facing coins. More formally, a beautiful sequence is a sequence of the form "HH.....TTT".
This is a companion discussion topic for the original entry at https://algo.monster/problems/amazon_oa_coin_sequence/