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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: A = None
        self.o: C = None
        self.t: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: I = None
        self.r: F = None
        self.v: D = None
        self.x: I = None
        self.p: H = None
        self.y: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: A = None
        self.o: C = None
        self.t: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: I = None
        self.r: F = None
        self.v: D = None
        self.x: I = None
        self.p: H = None
        self.y: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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