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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: E = None
        self.s: C = None
        self.t: I = None
        self.w: D = None
        self.z: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: E = None
        self.z: B = None
        self.r: J = None
        self.u: F = None
        self.p: G = None
        self.y: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: I = None
        self.s: G = None
        self.x: D = None
        self.y: J = None
        self.p: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: I = None
        self.u: E = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: F = None
        self.q: F = None
        self.w: G = None
        self.s: D = None
        self.o: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: D = None
        self.x: G = None
        self.s: C = None
        self.q: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: E = None
        self.s: C = None
        self.t: I = None
        self.w: D = None
        self.z: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: E = None
        self.z: B = None
        self.r: J = None
        self.u: F = None
        self.p: G = None
        self.y: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: I = None
        self.s: G = None
        self.x: D = None
        self.y: J = None
        self.p: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: I = None
        self.u: E = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: F = None
        self.q: F = None
        self.w: G = None
        self.s: D = None
        self.o: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: D = None
        self.x: G = None
        self.s: C = None
        self.q: I = None
        self.txt = txt

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

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