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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: B = None
        self.t: H = None
        self.x: I = None
        self.r: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: C = None
        self.y: H = None
        self.o: D = None
        self.x: B = None
        self.q: D = None
        self.w: B = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: C = None
        self.y: E = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: B = None
        self.t: H = None
        self.x: I = None
        self.r: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: C = None
        self.y: H = None
        self.o: D = None
        self.x: B = None
        self.q: D = None
        self.w: B = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: C = None
        self.y: E = None
        self.t: D = None
        self.txt = txt

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

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