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

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

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

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

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

l = A("l")
m = B("m")
g = C("g")
b = D("b")
k = E("k")
c = D("c")
h = C("h")
d = B("d")
f = A("f")
e = E("e")

l.t = h
l.o = g
l.x = f
l.v = k
l.y = d
m.o = g
m.v = h
g.s = h
g.w = l
g.v = b
g.r = b
g.o = k
b.z = f
b.u = h
k.y = h
c.z = f
c.u = h
h.s = g
h.w = l
h.v = b
h.o = k
h.r = c
d.o = g
d.v = g
f.t = h
f.o = g
f.x = l
f.v = k
f.y = m
e.y = h
assert b.z.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: C = None
        self.x: A = None
        self.v: E = None
        self.y: B = None
        self.txt = txt

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

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

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

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

l = A("l")
m = B("m")
g = C("g")
b = D("b")
k = E("k")
c = D("c")
h = C("h")
d = B("d")
f = A("f")
e = E("e")

l.t = h
l.o = g
l.x = f
l.v = k
l.y = d
m.o = g
m.v = h
g.s = h
g.w = l
g.v = b
g.r = b
g.o = k
b.z = f
b.u = h
k.y = h
c.z = f
c.u = h
h.s = g
h.w = l
h.v = b
h.o = k
h.r = c
d.o = g
d.v = g
f.t = h
f.o = g
f.x = l
f.v = k
f.y = m
e.y = h
assert b.z.o.s.txt == "h"