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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: A = None
        self.p: B = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: A = None
        self.p: B = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

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