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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: G = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: F = None
        self.q: E = None
        self.t: E = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: B = None
        self.r: F = None
        self.u: A = None
        self.z: B = None
        self.q: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: H = None
        self.w: F = None
        self.s: A = None
        self.y: A = None
        self.x: F = None
        self.o: E = None
        self.txt = txt

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

j = A("j")
h = B("h")
e = C("e")
c = D("c")
l = E("l")
m = F("m")
i = G("i")
d = H("d")
a = A("a")
n = B("n")

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: G = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: F = None
        self.q: E = None
        self.t: E = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: B = None
        self.r: F = None
        self.u: A = None
        self.z: B = None
        self.q: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: H = None
        self.w: F = None
        self.s: A = None
        self.y: A = None
        self.x: F = None
        self.o: E = None
        self.txt = txt

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

j = A("j")
h = B("h")
e = C("e")
c = D("c")
l = E("l")
m = F("m")
i = G("i")
d = H("d")
a = A("a")
n = B("n")

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