class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: G = None
        self.x: B = None
        self.w: B = None
        self.v: C = None
        self.r: F = None
        self.o: I = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.r: B = None
        self.t: B = None
        self.p: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: J = None
        self.q: J = None
        self.w: G = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: D = None
        self.t: A = None
        self.x: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: A = None
        self.y: D = None
        self.o: C = None
        self.z: B = None
        self.w: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.r: B = None
        self.t: B = None
        self.p: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: J = None
        self.q: J = None
        self.w: G = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: D = None
        self.t: A = None
        self.x: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: A = None
        self.y: D = None
        self.o: C = None
        self.z: B = None
        self.w: F = None
        self.txt = txt

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

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