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

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

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

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

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

a = A("a")
j = B("j")
d = C("d")
h = D("h")
k = E("k")
m = C("m")
f = B("f")
e = A("e")

a.v = f
a.y = f
a.o = j
a.x = k
j.t = f
j.s = k
j.q = h
j.y = d
d.s = m
d.y = a
d.w = k
h.q = f
k.t = j
k.w = a
k.s = a
k.x = a
m.s = d
m.y = a
m.w = k
f.t = j
f.s = k
f.q = h
f.y = d
e.v = j
e.o = j
e.y = j
e.x = k
assert e.y.y.s.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: B = None
        self.x: E = None
        self.y: B = None
        self.txt = txt

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

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

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

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

a = A("a")
j = B("j")
d = C("d")
h = D("h")
k = E("k")
m = C("m")
f = B("f")
e = A("e")

a.v = f
a.y = f
a.o = j
a.x = k
j.t = f
j.s = k
j.q = h
j.y = d
d.s = m
d.y = a
d.w = k
h.q = f
k.t = j
k.w = a
k.s = a
k.x = a
m.s = d
m.y = a
m.w = k
f.t = j
f.s = k
f.q = h
f.y = d
e.v = j
e.o = j
e.y = j
e.x = k
assert e.y.y.s.w.t.txt == "j"