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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: F = None
        self.p: C = None
        self.s: B = None
        self.r: H = None
        self.w: B = None
        self.q: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: B = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: F = None
        self.p: C = None
        self.s: B = None
        self.r: H = None
        self.w: B = None
        self.q: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: B = None
        self.w: B = None
        self.txt = txt

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

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

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

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