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

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.s: A = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: I = None
        self.y: B = None
        self.o: B = None
        self.w: E = None
        self.v: I = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: E = None
        self.w: G = None
        self.q: C = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.s: A = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: I = None
        self.y: B = None
        self.o: B = None
        self.w: E = None
        self.v: I = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: E = None
        self.w: G = None
        self.q: C = None
        self.v: F = None
        self.txt = txt

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

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