class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: B = None
        self.y: E = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: C = None
        self.v: A = None
        self.y: B = None
        self.x: D = None
        self.txt = txt

n = A("n")
g = B("g")
j = C("j")
k = D("k")
d = E("d")
c = C("c")
i = C("i")
f = A("f")

n.z = i
n.o = g
n.y = d
n.p = c
g.v = k
j.s = k
j.u = f
k.x = d
k.u = d
k.s = j
k.t = j
k.v = f
d.z = g
d.y = g
d.o = c
d.v = f
d.x = k
c.s = k
c.u = n
i.s = k
i.u = n
f.z = c
f.p = c
f.o = g
f.y = d
assert i.s.t.s.x.o.u.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: B = None
        self.y: E = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: C = None
        self.v: A = None
        self.y: B = None
        self.x: D = None
        self.txt = txt

n = A("n")
g = B("g")
j = C("j")
k = D("k")
d = E("d")
c = C("c")
i = C("i")
f = A("f")

n.z = i
n.o = g
n.y = d
n.p = c
g.v = k
j.s = k
j.u = f
k.x = d
k.u = d
k.s = j
k.t = j
k.v = f
d.z = g
d.y = g
d.o = c
d.v = f
d.x = k
c.s = k
c.u = n
i.s = k
i.u = n
f.z = c
f.p = c
f.o = g
f.y = d
assert i.s.t.s.x.o.u.y.txt == "d"