class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: H = None
        self.r: A = None
        self.p: F = None
        self.t: B = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: A = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: A = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: B = None
        self.u: D = None
        self.p: F = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: E = None
        self.o: H = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: H = None
        self.r: A = None
        self.p: F = None
        self.t: B = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: A = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: A = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: B = None
        self.u: D = None
        self.p: F = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: E = None
        self.o: H = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: H = None
        self.txt = txt

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

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

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