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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: A = None
        self.u: B = None
        self.y: D = None
        self.txt = txt

i = A("i")
e = B("e")
k = C("k")
g = D("g")
a = E("a")
h = B("h")
l = D("l")
f = E("f")
m = A("m")

i.v = g
i.z = h
i.s = m
i.y = l
e.p = a
k.r = l
g.y = f
g.o = k
g.q = l
a.v = h
a.u = h
a.q = i
a.y = g
h.p = a
l.y = a
l.o = k
l.q = g
f.v = h
f.u = h
f.q = i
f.y = l
m.v = l
m.y = l
m.z = h
m.s = i
assert a.y.o.r.y.q.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: B = None
        self.s: A = None
        self.y: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: A = None
        self.u: B = None
        self.y: D = None
        self.txt = txt

i = A("i")
e = B("e")
k = C("k")
g = D("g")
a = E("a")
h = B("h")
l = D("l")
f = E("f")
m = A("m")

i.v = g
i.z = h
i.s = m
i.y = l
e.p = a
k.r = l
g.y = f
g.o = k
g.q = l
a.v = h
a.u = h
a.q = i
a.y = g
h.p = a
l.y = a
l.o = k
l.q = g
f.v = h
f.u = h
f.q = i
f.y = l
m.v = l
m.y = l
m.z = h
m.s = i
assert a.y.o.r.y.q.txt == "i"