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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: C = None
        self.v: C = None
        self.q: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: H = None
        self.p: G = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: E = None
        self.x: B = None
        self.s: A = None
        self.v: C = None
        self.w: E = None
        self.txt = txt

g = A("g")
k = B("k")
m = C("m")
e = D("e")
b = E("b")
f = F("f")
j = G("j")
c = H("c")
h = G("h")
n = C("n")

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: C = None
        self.v: C = None
        self.q: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: H = None
        self.p: G = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: E = None
        self.x: B = None
        self.s: A = None
        self.v: C = None
        self.w: E = None
        self.txt = txt

g = A("g")
k = B("k")
m = C("m")
e = D("e")
b = E("b")
f = F("f")
j = G("j")
c = H("c")
h = G("h")
n = C("n")

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