class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: E = None
        self.v: B = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: C = None
        self.o: D = None
        self.r: E = None
        self.p: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: B = None
        self.r: A = None
        self.v: G = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: D = None
        self.r: E = None
        self.p: F = None
        self.w: G = None
        self.t: D = None
        self.txt = txt

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

e = A("e")
h = B("h")
n = C("n")
k = D("k")
j = E("j")
d = F("d")
m = G("m")
l = F("l")
f = F("f")
g = C("g")

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: C = None
        self.o: D = None
        self.r: E = None
        self.p: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: B = None
        self.r: A = None
        self.v: G = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: D = None
        self.r: E = None
        self.p: F = None
        self.w: G = None
        self.t: D = None
        self.txt = txt

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

e = A("e")
h = B("h")
n = C("n")
k = D("k")
j = E("j")
d = F("d")
m = G("m")
l = F("l")
f = F("f")
g = C("g")

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