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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: D = None
        self.p: A = None
        self.v: A = None
        self.x: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: A = None
        self.x: B = None
        self.y: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: D = None
        self.p: A = None
        self.v: A = None
        self.x: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: A = None
        self.x: B = None
        self.y: A = None
        self.txt = txt

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

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

i.o = j
i.z = b
i.q = l
i.v = l
i.s = m
l.u = m
l.y = b
l.p = i
l.v = i
l.x = i
m.t = b
b.t = l
b.x = l
b.u = g
b.y = g
j.z = b
j.y = b
j.w = l
j.u = g
j.p = i
g.o = j
g.z = b
g.q = l
g.v = l
g.s = m
assert b.u.o.y.u.q.txt == "l"