class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: B = None
        self.v: C = None
        self.w: B = None
        self.y: D = None
        self.u: G = None
        self.r: F = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: H = None
        self.s: B = None
        self.y: H = None
        self.z: F = None
        self.w: B = None
        self.u: D = None
        self.p: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: H = None
        self.s: B = None
        self.y: H = None
        self.z: F = None
        self.w: B = None
        self.u: D = None
        self.p: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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