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

class B:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: D = None
        self.q: A = None
        self.u: C = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: D = None
        self.t: B = None
        self.q: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: D = None
        self.q: A = None
        self.u: C = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: D = None
        self.t: B = None
        self.q: C = None
        self.txt = txt

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

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

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

l.t = e
l.z = e
l.y = m
l.p = f
l.s = c
g.t = m
g.r = f
g.q = k
g.u = c
g.x = e
i.w = m
i.p = f
i.t = g
i.q = c
f.o = e
f.x = e
f.t = l
f.u = c
e.s = f
k.t = e
k.z = e
k.y = m
k.p = f
k.s = c
m.t = g
m.r = f
m.q = l
m.u = h
m.x = e
c.w = g
c.t = g
c.p = f
c.q = h
h.w = g
h.p = f
h.t = m
h.q = i
assert c.p.o.s.o.s.o.s.x.s.txt == "f"