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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: D = None
        self.t: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: C = None
        self.s: D = None
        self.v: C = None
        self.z: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: D = None
        self.t: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: C = None
        self.s: D = None
        self.v: C = None
        self.z: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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