class A:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: D = None
        self.y: B = None
        self.z: G = None
        self.s: I = None
        self.p: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: D = None
        self.y: B = None
        self.z: G = None
        self.s: I = None
        self.p: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: E = None
        self.txt = txt

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

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