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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: E = None
        self.r: D = None
        self.s: A = None
        self.u: D = None
        self.txt = txt

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

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

e = A("e")
j = B("j")
n = C("n")
i = D("i")
f = E("f")
b = B("b")
d = C("d")
g = B("g")
k = D("k")

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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: E = None
        self.r: D = None
        self.s: A = None
        self.u: D = None
        self.txt = txt

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

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

e = A("e")
j = B("j")
n = C("n")
i = D("i")
f = E("f")
b = B("b")
d = C("d")
g = B("g")
k = D("k")

e.t = f
e.p = f
e.z = f
e.q = d
e.s = k
j.s = f
j.u = g
n.y = i
n.r = i
n.w = f
n.s = e
n.u = k
i.r = f
i.v = f
i.z = f
i.o = f
i.y = k
f.w = n
f.q = e
b.s = f
b.u = g
d.y = k
d.u = k
d.w = f
d.r = i
d.s = e
g.s = f
g.u = b
k.r = f
k.v = f
k.z = f
k.o = f
k.y = i
assert b.s.w.u.o.w.s.q.r.z.txt == "f"