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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: G = None
        self.v: D = None
        self.p: D = None
        self.s: E = None
        self.z: C = None
        self.u: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: D = None
        self.x: G = None
        self.y: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: G = None
        self.v: D = None
        self.p: D = None
        self.s: E = None
        self.z: C = None
        self.u: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: D = None
        self.x: G = None
        self.y: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: B = None
        self.txt = txt

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

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

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