class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: B = None
        self.v: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: C = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: C = None
        self.o: B = None
        self.txt = txt

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

n.y = i
n.w = c
n.v = a
c.z = a
c.u = e
a.r = i
a.y = i
a.s = n
a.o = f
f.u = a
k.u = f
k.x = i
k.o = c
i.r = a
i.y = a
i.s = n
i.o = f
g.u = f
g.x = i
g.o = c
e.y = i
e.v = i
e.w = c
d.y = a
d.v = a
d.w = c
assert i.y.s.v.s.y.o.u.o.txt == "f"