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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: A = None
        self.t: F = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: H = None
        self.v: F = None
        self.o: F = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: C = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: A = None
        self.w: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: B = None
        self.w: G = None
        self.t: E = None
        self.o: D = None
        self.s: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: A = None
        self.t: F = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: H = None
        self.v: F = None
        self.o: F = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: C = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: A = None
        self.w: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: B = None
        self.w: G = None
        self.t: E = None
        self.o: D = None
        self.s: B = None
        self.txt = txt

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

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