class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: F = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: D = None
        self.q: G = None
        self.z: F = None
        self.w: A = None
        self.u: A = None
        self.p: H = None
        self.x: G = None
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: H = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: C = None
        self.s: G = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: G = None
        self.x: G = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: A = None
        self.s: I = None
        self.u: B = None
        self.x: B = None
        self.q: I = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

l = A("l")
n = B("n")
g = C("g")
d = D("d")
m = E("m")
b = F("b")
a = G("a")
j = H("j")
k = I("k")

l.q = b
l.w = b
l.r = a
n.v = k
n.t = b
g.y = k
g.r = d
g.q = a
g.x = a
g.z = b
g.w = l
g.u = l
g.p = j
g.t = j
d.t = m
d.x = j
d.w = k
m.v = a
m.s = a
m.q = g
m.r = l
b.r = k
b.q = k
b.p = a
b.x = a
a.r = g
a.y = m
j.w = a
j.t = l
j.s = k
j.q = k
j.u = n
j.x = n
j.y = m
k.q = a
assert a.y.q.y.q.y.v.r.u.q.txt == "
class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: F = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: D = None
        self.q: G = None
        self.z: F = None
        self.w: A = None
        self.u: A = None
        self.p: H = None
        self.x: G = None
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: H = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: C = None
        self.s: G = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: G = None
        self.x: G = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: A = None
        self.s: I = None
        self.u: B = None
        self.x: B = None
        self.q: I = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

l = A("l")
n = B("n")
g = C("g")
d = D("d")
m = E("m")
b = F("b")
a = G("a")
j = H("j")
k = I("k")

l.q = b
l.w = b
l.r = a
n.v = k
n.t = b
g.y = k
g.r = d
g.q = a
g.x = a
g.z = b
g.w = l
g.u = l
g.p = j
g.t = j
d.t = m
d.x = j
d.w = k
m.v = a
m.s = a
m.q = g
m.r = l
b.r = k
b.q = k
b.p = a
b.x = a
a.r = g
a.y = m
j.w = a
j.t = l
j.s = k
j.q = k
j.u = n
j.x = n
j.y = m
k.q = a
assert a.y.q.y.q.y.v.r.u.q.txt == "b"