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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: F = None
        self.r: A = None
        self.x: E = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: C = None
        self.x: E = None
        self.o: D = None
        self.v: B = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: A = None
        self.r: E = None
        self.u: A = None
        self.p: E = None
        self.z: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: F = None
        self.r: A = None
        self.x: E = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: C = None
        self.x: E = None
        self.o: D = None
        self.v: B = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: A = None
        self.r: E = None
        self.u: A = None
        self.p: E = None
        self.z: H = None
        self.txt = txt

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

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