class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: D = None
        self.r: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: I = None
        self.u: F = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: C = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: J = None
        self.v: F = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: I = None
        self.u: F = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: C = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: J = None
        self.v: F = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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