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

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

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

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

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

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

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

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

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

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

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

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

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