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

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: F = None
        self.w: F = None
        self.p: A = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: J = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: B = None
        self.q: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: A = None
        self.z: F = None
        self.o: C = None
        self.txt = txt

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

d.w = c
d.o = m
e.z = h
e.y = c
e.p = n
j.v = m
j.w = h
n.v = m
n.q = m
n.w = m
n.t = m
n.p = d
l.w = b
m.o = a
h.u = l
h.y = a
h.z = b
b.t = m
b.q = m
b.v = e
c.q = b
c.z = b
c.s = n
a.q = c
a.u = d
a.z = m
a.o = j
assert h.z.v.z.u.txt == "
class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: F = None
        self.w: F = None
        self.p: A = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: J = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: B = None
        self.q: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: A = None
        self.z: F = None
        self.o: C = None
        self.txt = txt

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

d.w = c
d.o = m
e.z = h
e.y = c
e.p = n
j.v = m
j.w = h
n.v = m
n.q = m
n.w = m
n.t = m
n.p = d
l.w = b
m.o = a
h.u = l
h.y = a
h.z = b
b.t = m
b.q = m
b.v = e
c.q = b
c.z = b
c.s = n
a.q = c
a.u = d
a.z = m
a.o = j
assert h.z.v.z.u.txt == "l"