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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: J = None
        self.x: H = None
        self.y: C = None
        self.v: B = None
        self.w: C = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: D = None
        self.o: B = None
        self.t: J = None
        self.p: C = None
        self.u: E = None
        self.w: J = None
        self.x: I = None
        self.v: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: G = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: J = None
        self.x: H = None
        self.y: C = None
        self.v: B = None
        self.w: C = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: D = None
        self.o: B = None
        self.t: J = None
        self.p: C = None
        self.u: E = None
        self.w: J = None
        self.x: I = None
        self.v: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: G = None
        self.o: F = None
        self.txt = txt

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

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

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