class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: B = None
        self.v: B = None
        self.u: B = None
        self.y: C = None
        self.x: B = None
        self.r: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: H = None
        self.y: F = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: H = None
        self.r: E = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: H = None
        self.s: D = None
        self.z: A = None
        self.x: E = None
        self.o: F = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: H = None
        self.y: F = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: H = None
        self.r: E = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: H = None
        self.s: D = None
        self.z: A = None
        self.x: E = None
        self.o: F = None
        self.v: C = None
        self.txt = txt

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

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

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