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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: D = None
        self.t: G = None
        self.r: D = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: F = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: G = None
        self.r: F = None
        self.s: C = None
        self.w: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: G = None
        self.s: C = None
        self.t: A = None
        self.y: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: D = None
        self.t: G = None
        self.r: D = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: F = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: G = None
        self.r: F = None
        self.s: C = None
        self.w: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: G = None
        self.s: C = None
        self.t: A = None
        self.y: G = None
        self.txt = txt

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

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

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