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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: D = None
        self.p: E = None
        self.q: A = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: A = None
        self.q: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: D = None
        self.p: E = None
        self.q: A = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: A = None
        self.q: A = None
        self.txt = txt

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

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