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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: H = None
        self.p: C = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

l.t = d
k.w = m
m.o = d
m.w = f
m.v = f
m.x = f
m.z = h
m.p = l
m.u = k
m.r = e
d.z = m
d.p = m
d.v = h
d.w = h
d.u = k
i.w = j
i.t = j
i.p = m
i.u = l
h.t = e
e.r = l
e.w = f
j.q = i
j.p = d
j.u = e
j.o = l
f.q = j
assert j.q.w.q.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: H = None
        self.p: C = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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