You are implementing a simplified KYC verification pipeline for onboarding business accounts. Each account contains these text fields:
-
business_name
-
business_profile_name
-
full_statement_descriptor
-
short_statement_descriptor
-
url
-
product_description
-
(Part 4 only) optional
business_full_name
For each account, output one line in input order:
-
VERIFIED: <business_name>
or
-
NOT VERIFIED: <business_name>
Assume missing fields are treated as empty.
Part 1 — Basic KYC verification
An account is VERIFIED iff all 6 required fields are present and non-empty.
Part 2 — Descriptor length validation
In addition to Part 1, full_statement_descriptor (after trimming leading/trailing whitespace) must have length between 5 and 31 (inclusive). Otherwise the account is NOT VERIFIED.
Part 3 — Generic descriptor blocklist
In addition to Parts 1–2, the account is NOT VERIFIED if full_statement_descriptor (case-insensitive) is exactly one of the following generic descriptors:
-
ONLINE STORE
-
ECOMMERCE
-
RETAIL
-
SHOP
-
GENERAL MERCHANDISE
Part 4 — Business name matching
In addition to Parts 1–3, the account is VERIFIED only if either business_name or business_full_name satisfies this rule:
-
Tokenize the chosen business name into words (split on whitespace).
-
Tokenize
full_statement_descriptor
into words (split on whitespace).
-
Comparison is
case-insensitive
.
-
At least
50% of the words
in the chosen business name must appear in the descriptor’s word set.
Output requirement
Print the verification result for each account in order.
Notes
-
Treat a field containing only whitespace as empty.
-
You may assume input size can be large; aim for efficient processing per account.