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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: E = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: H = None
        self.q: H = None
        self.z: G = None
        self.v: F = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: B = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: C = None
        self.u: G = None
        self.p: G = None
        self.o: A = None
        self.q: F = None
        self.z: E = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: C = None
        self.p: C = None
        self.r: A = None
        self.y: E = None
        self.txt = txt

k = A("k")
c = B("c")
d = C("d")
a = D("a")
n = E("n")
f = F("f")
j = G("j")
i = H("i")
l = G("l")
m = H("m")

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: E = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: H = None
        self.q: H = None
        self.z: G = None
        self.v: F = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: B = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: C = None
        self.u: G = None
        self.p: G = None
        self.o: A = None
        self.q: F = None
        self.z: E = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: C = None
        self.p: C = None
        self.r: A = None
        self.y: E = None
        self.txt = txt

k = A("k")
c = B("c")
d = C("d")
a = D("a")
n = E("n")
f = F("f")
j = G("j")
i = H("i")
l = G("l")
m = H("m")

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