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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: A = None
        self.s: A = None
        self.q: B = None
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: A = None
        self.s: A = None
        self.q: B = None
        self.p: D = None
        self.txt = txt

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

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