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

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

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

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

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

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

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

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

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

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

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

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

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