class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: F = None
        self.r: D = None
        self.s: E = None
        self.w: E = None
        self.v: G = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: C = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: E = None
        self.u: B = None
        self.q: D = None
        self.v: F = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: B = None
        self.r: E = None
        self.w: A = None
        self.x: B = None
        self.o: B = None
        self.z: F = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: B = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: G = None
        self.w: D = None
        self.x: B = None
        self.y: E = None
        self.txt = txt

l = A("l")
a = B("a")
i = C("i")
k = D("k")
f = E("f")
j = F("j")
b = G("b")
n = H("n")
e = E("e")

l.q = n
l.p = j
l.r = k
l.t = k
l.s = e
l.w = f
l.v = b
a.q = j
a.r = i
a.u = b
i.r = n
i.t = e
i.u = a
i.q = k
i.v = j
i.p = l
k.t = a
k.y = a
k.x = a
k.o = a
k.r = f
k.w = l
k.z = j
k.p = j
f.o = j
f.z = a
f.p = a
j.u = a
j.r = f
b.u = k
b.q = n
b.p = l
b.o = l
b.r = i
b.z = i
b.w = i
b.x = f
n.s = l
n.v = b
n.w = k
n.x = a
n.y = e
e.o = j
e.z = a
e.p = a
assert a.r.u.r.q.txt == "
class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: F = None
        self.r: D = None
        self.s: E = None
        self.w: E = None
        self.v: G = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: C = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: E = None
        self.u: B = None
        self.q: D = None
        self.v: F = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: B = None
        self.r: E = None
        self.w: A = None
        self.x: B = None
        self.o: B = None
        self.z: F = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: B = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: G = None
        self.w: D = None
        self.x: B = None
        self.y: E = None
        self.txt = txt

l = A("l")
a = B("a")
i = C("i")
k = D("k")
f = E("f")
j = F("j")
b = G("b")
n = H("n")
e = E("e")

l.q = n
l.p = j
l.r = k
l.t = k
l.s = e
l.w = f
l.v = b
a.q = j
a.r = i
a.u = b
i.r = n
i.t = e
i.u = a
i.q = k
i.v = j
i.p = l
k.t = a
k.y = a
k.x = a
k.o = a
k.r = f
k.w = l
k.z = j
k.p = j
f.o = j
f.z = a
f.p = a
j.u = a
j.r = f
b.u = k
b.q = n
b.p = l
b.o = l
b.r = i
b.z = i
b.w = i
b.x = f
n.s = l
n.v = b
n.w = k
n.x = a
n.y = e
e.o = j
e.z = a
e.p = a
assert a.r.u.r.q.txt == "k"