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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: C = None
        self.r: D = None
        self.v: E = None
        self.o: I = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: E = None
        self.z: J = None
        self.y: B = None
        self.x: I = None
        self.u: H = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: D = None
        self.q: D = None
        self.z: B = None
        self.x: E = None
        self.u: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.z: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: C = None
        self.r: H = None
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: C = None
        self.r: D = None
        self.v: E = None
        self.o: I = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: E = None
        self.z: J = None
        self.y: B = None
        self.x: I = None
        self.u: H = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: D = None
        self.q: D = None
        self.z: B = None
        self.x: E = None
        self.u: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.z: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: C = None
        self.r: H = None
        self.p: E = None
        self.txt = txt

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

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