class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: G = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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

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