class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: H = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: F = None
        self.w: E = None
        self.txt = txt

n = A("n")
c = B("c")
h = C("h")
d = D("d")
e = E("e")
f = F("f")
b = G("b")
k = H("k")
a = D("a")

n.u = f
n.o = k
n.s = k
c.u = n
h.p = b
h.o = a
h.z = c
d.p = c
d.o = k
d.q = b
d.r = b
d.y = e
d.s = e
d.w = f
d.u = h
e.v = b
e.r = b
e.q = b
e.o = c
e.p = f
f.w = k
f.o = a
b.y = n
b.t = k
k.y = n
k.r = f
k.w = e
a.p = c
a.o = k
a.q = b
a.r = b
a.y = e
a.s = e
a.w = f
a.u = h
assert c.u.u.w.y.u.o.y.v.txt == "
class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: H = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: F = None
        self.w: E = None
        self.txt = txt

n = A("n")
c = B("c")
h = C("h")
d = D("d")
e = E("e")
f = F("f")
b = G("b")
k = H("k")
a = D("a")

n.u = f
n.o = k
n.s = k
c.u = n
h.p = b
h.o = a
h.z = c
d.p = c
d.o = k
d.q = b
d.r = b
d.y = e
d.s = e
d.w = f
d.u = h
e.v = b
e.r = b
e.q = b
e.o = c
e.p = f
f.w = k
f.o = a
b.y = n
b.t = k
k.y = n
k.r = f
k.w = e
a.p = c
a.o = k
a.q = b
a.r = b
a.y = e
a.s = e
a.w = f
a.u = h
assert c.u.u.w.y.u.o.y.v.txt == "b"