{"problem":{"name":"A to Z String","description":{"content":"Snuke has decided to construct a string that starts with `A` and ends with `Z`, by taking out a substring of a string $s$ (that is, a consecutive part of $s$). Find the greatest length of the string S","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc053_b"},"statements":[{"statement_type":"Markdown","content":"Snuke has decided to construct a string that starts with `A` and ends with `Z`, by taking out a substring of a string $s$ (that is, a consecutive part of $s$).\nFind the greatest length of the string Snuke can construct. Here, the test set guarantees that there always exists a substring of $s$ that starts with `A` and ends with `Z`.\n\n## Constraints\n\n*   $1 ≦ |s| ≦ 200{,}000$\n*   $s$ consists of uppercase English letters.\n*   There exists a substring of $s$ that starts with `A` and ends with `Z`.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$s$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc053_b","tags":[],"sample_group":[["QWERTYASDFZXCV","5\n\nBy taking out the seventh through eleventh characters, it is possible to construct `ASDFZ`, which starts with `A` and ends with `Z`."],["ZABCZ","4"],["HASFJGHOGAKZZFEGA","12"]],"created_at":"2026-03-03 11:01:14"}}