class A:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: H = None
        self.t: J = None
        self.p: I = None
        self.q: D = None
        self.o: D = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: A = None
        self.t: H = None
        self.u: E = None
        self.x: B = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: I = None
        self.q: G = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.u: D = None
        self.y: G = None
        self.v: B = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: B = None
        self.u: I = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: A = None
        self.x: C = None
        self.y: B = None
        self.r: A = None
        self.w: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: H = None
        self.t: J = None
        self.p: I = None
        self.q: D = None
        self.o: D = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: A = None
        self.t: H = None
        self.u: E = None
        self.x: B = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: I = None
        self.q: G = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.u: D = None
        self.y: G = None
        self.v: B = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: B = None
        self.u: I = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: A = None
        self.x: C = None
        self.y: B = None
        self.r: A = None
        self.w: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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