class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: C = None
        self.w: E = None
        self.s: D = None
        self.t: B = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: C = None
        self.w: E = None
        self.s: D = None
        self.t: B = None
        self.o: C = None
        self.txt = txt

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

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

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