class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: G = None
        self.y: F = None
        self.s: J = None
        self.x: H = None
        self.o: H = None
        self.q: J = None
        self.z: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: B = None
        self.q: H = None
        self.s: E = None
        self.y: B = None
        self.u: C = None
        self.o: E = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.v: B = None
        self.y: I = None
        self.x: I = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: E = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: B = None
        self.q: H = None
        self.s: E = None
        self.y: B = None
        self.u: C = None
        self.o: E = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.v: B = None
        self.y: I = None
        self.x: I = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: E = None
        self.s: G = None
        self.txt = txt

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

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

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

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