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

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

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

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

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

c = A("c")
d = B("d")
f = C("f")
j = D("j")
l = E("l")
e = D("e")
i = C("i")

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

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

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

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

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

c = A("c")
d = B("d")
f = C("f")
j = D("j")
l = E("l")
e = D("e")
i = C("i")

c.p = e
c.u = e
c.s = l
c.t = f
c.z = f
d.r = j
f.y = e
f.x = d
f.q = d
j.w = l
j.y = l
j.x = c
j.t = d
l.o = i
l.r = e
e.w = l
e.y = l
e.x = c
e.t = d
i.y = e
i.x = d
i.q = d
assert i.y.x.t.y.txt == "e"