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

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

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

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

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

c = A("c")
e = B("e")
b = C("b")
l = D("l")
g = E("g")
k = A("k")
i = C("i")
j = B("j")

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

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

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

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

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

c = A("c")
e = B("e")
b = C("b")
l = D("l")
g = E("g")
k = A("k")
i = C("i")
j = B("j")

c.u = l
c.z = l
c.q = b
c.s = b
c.r = k
e.y = j
e.q = j
e.p = l
e.o = l
b.w = l
b.x = g
b.z = g
l.s = k
l.o = i
l.q = e
g.s = c
g.q = k
k.u = l
k.z = l
k.q = i
k.r = c
k.s = b
i.w = l
i.x = g
i.z = g
j.y = e
j.q = e
j.p = l
j.o = l
assert l.o.w.s.q.txt == "i"