class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: H = None
        self.u: D = None
        self.v: H = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: H = None
        self.r: F = None
        self.t: D = None
        self.w: F = None
        self.p: A = None
        self.q: F = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: E = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: H = None
        self.t: F = None
        self.u: D = None
        self.w: F = None
        self.p: B = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: H = None
        self.y: D = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: D = None
        self.x: B = None
        self.r: H = None
        self.w: B = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: C = None
        self.q: B = None
        self.z: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: H = None
        self.r: F = None
        self.t: D = None
        self.w: F = None
        self.p: A = None
        self.q: F = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: E = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: H = None
        self.t: F = None
        self.u: D = None
        self.w: F = None
        self.p: B = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: H = None
        self.y: D = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: D = None
        self.x: B = None
        self.r: H = None
        self.w: B = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: C = None
        self.q: B = None
        self.z: G = None
        self.txt = txt

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

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