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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: A = None
        self.w: J = None
        self.v: F = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: G = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: H = None
        self.x: I = None
        self.r: A = None
        self.y: A = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: I = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: C = None
        self.p: C = None
        self.z: F = None
        self.o: F = None
        self.x: F = None
        self.q: J = None
        self.r: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: A = None
        self.w: J = None
        self.v: F = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: G = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: H = None
        self.x: I = None
        self.r: A = None
        self.y: A = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: I = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: C = None
        self.p: C = None
        self.z: F = None
        self.o: F = None
        self.x: F = None
        self.q: J = None
        self.r: C = None
        self.txt = txt

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

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

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