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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: B = None
        self.u: A = None
        self.p: E = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: A = None
        self.t: H = None
        self.v: H = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: B = None
        self.u: A = None
        self.p: E = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: A = None
        self.t: H = None
        self.v: H = None
        self.txt = txt

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

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

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