class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: F = None
        self.s: E = None
        self.z: F = None
        self.p: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: B = None
        self.p: B = None
        self.q: B = None
        self.z: D = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: A = None
        self.o: H = None
        self.q: D = None
        self.x: A = None
        self.y: A = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: C = None
        self.v: D = None
        self.y: G = None
        self.r: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: B = None
        self.p: B = None
        self.q: B = None
        self.z: D = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: A = None
        self.o: H = None
        self.q: D = None
        self.x: A = None
        self.y: A = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: C = None
        self.v: D = None
        self.y: G = None
        self.r: D = None
        self.txt = txt

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

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