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

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: C = None
        self.y: C = None
        self.o: C = None
        self.r: E = None
        self.u: E = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: A = None
        self.r: H = None
        self.o: E = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: A = None
        self.q: A = None
        self.z: B = None
        self.y: F = None
        self.r: B = None
        self.o: F = None
        self.v: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: C = None
        self.y: C = None
        self.o: C = None
        self.r: E = None
        self.u: E = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: A = None
        self.r: H = None
        self.o: E = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: A = None
        self.q: A = None
        self.z: B = None
        self.y: F = None
        self.r: B = None
        self.o: F = None
        self.v: B = None
        self.txt = txt

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

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