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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: E = None
        self.q: B = None
        self.p: H = None
        self.z: C = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: G = None
        self.p: C = None
        self.q: B = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: C = None
        self.z: B = None
        self.w: A = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: E = None
        self.q: B = None
        self.p: H = None
        self.z: C = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: G = None
        self.p: C = None
        self.q: B = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: C = None
        self.z: B = None
        self.w: A = None
        self.q: C = None
        self.txt = txt

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

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