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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: F = None
        self.p: I = None
        self.q: H = None
        self.w: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: F = None
        self.p: C = None
        self.w: C = None
        self.o: C = None
        self.u: F = None
        self.x: G = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: J = None
        self.x: F = None
        self.o: G = None
        self.w: F = None
        self.y: H = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: D = None
        self.z: D = None
        self.p: I = None
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: H = None
        self.w: F = None
        self.u: J = None
        self.t: A = None
        self.q: C = None
        self.s: G = None
        self.z: D = None
        self.y: G = None
        self.r: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: F = None
        self.p: I = None
        self.q: H = None
        self.w: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: F = None
        self.p: C = None
        self.w: C = None
        self.o: C = None
        self.u: F = None
        self.x: G = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: J = None
        self.x: F = None
        self.o: G = None
        self.w: F = None
        self.y: H = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: D = None
        self.z: D = None
        self.p: I = None
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: H = None
        self.w: F = None
        self.u: J = None
        self.t: A = None
        self.q: C = None
        self.s: G = None
        self.z: D = None
        self.y: G = None
        self.r: C = None
        self.txt = txt

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

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

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