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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: B = None
        self.x: I = None
        self.u: A = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: F = None
        self.w: F = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: I = None
        self.p: E = None
        self.s: H = None
        self.v: A = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: B = None
        self.o: E = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: D = None
        self.t: C = None
        self.o: D = None
        self.v: B = None
        self.u: D = None
        self.s: B = None
        self.x: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: B = None
        self.x: I = None
        self.u: A = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: F = None
        self.w: F = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: I = None
        self.p: E = None
        self.s: H = None
        self.v: A = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: B = None
        self.o: E = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: D = None
        self.t: C = None
        self.o: D = None
        self.v: B = None
        self.u: D = None
        self.s: B = None
        self.x: G = None
        self.txt = txt

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

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

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