Create a Python module that defines a class Solution with a method countAndSay(self, n: int) -> str.
The method should return the nth term of the count-and-say sequence, starting with the first term "1" for n = 1.
Construction rule: To obtain the next term from the previous term, read off consecutive groups of the same digit and describe each group by its length followed by the digit. For example, starting from "1":
"1" -> "11" (one 1)
"11" -> "21" (two 1s)
"21" -> "1211" (one 2, then one 1)
and so on.
Implement the solution iteratively:
Initialize current = "1".
For i from 2 to n, build the next term by scanning current, grouping consecutive identical digits, and appending count + digit to the result.
Use an efficient string-building approach (e.g., accumulate parts in a list and join at the end) to avoid repeated string concatenation.
Package and import behavior:
The test imports from leetcode.count_and_say import Solution, so provide:
A package directory leetcode with an init.py file.
A module leetcode/count_and_say.py containing the Solution class.
Edge cases:
n is a positive integer (assume 1 ≤ n in tests).
Return type must be a string.
Notes
The provided tests expect:
countAndSay(1) -> "1"
countAndSay(2) -> "11"
countAndSay(3) -> "21"
countAndSay(4) -> "1211"
Deliverables
A self-contained Python package layout:
leetcode/init.py
leetcode/count_and_say.py with the implemented Solution class and countAndSay method.