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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: A = None
        self.r: A = None
        self.z: F = None
        self.t: D = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: G = None
        self.o: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: H = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: A = None
        self.r: A = None
        self.z: F = None
        self.t: D = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: G = None
        self.o: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: H = None
        self.txt = txt

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

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