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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: G = None
        self.z: H = None
        self.y: A = None
        self.v: E = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: G = None
        self.z: H = None
        self.y: A = None
        self.v: E = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

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

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

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