class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: C = None
        self.s: C = None
        self.z: F = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: E = None
        self.r: H = None
        self.z: A = None
        self.t: G = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: D = None
        self.y: D = None
        self.s: E = None
        self.r: B = None
        self.txt = txt

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

h = A("h")
c = B("c")
m = C("m")
e = D("e")
n = E("n")
l = F("l")
k = G("k")
d = H("d")
g = C("g")
i = H("i")

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: E = None
        self.r: H = None
        self.z: A = None
        self.t: G = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: D = None
        self.y: D = None
        self.s: E = None
        self.r: B = None
        self.txt = txt

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

h = A("h")
c = B("c")
m = C("m")
e = D("e")
n = E("n")
l = F("l")
k = G("k")
d = H("d")
g = C("g")
i = H("i")

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