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

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: B = None
        self.s: H = None
        self.u: B = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: G = None
        self.s: H = None
        self.u: A = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: B = None
        self.t: C = None
        self.q: G = None
        self.u: H = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: B = None
        self.s: H = None
        self.u: B = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: G = None
        self.s: H = None
        self.u: A = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: B = None
        self.t: C = None
        self.q: G = None
        self.u: H = None
        self.p: G = None
        self.txt = txt

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

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

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

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