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

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

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

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

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

d = A("d")
l = B("l")
b = C("b")
a = D("a")
e = E("e")
f = B("f")
j = E("j")
m = C("m")

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

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

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

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

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

d = A("d")
l = B("l")
b = C("b")
a = D("a")
e = E("e")
f = B("f")
j = E("j")
m = C("m")

d.s = j
d.x = j
l.x = f
l.z = f
l.y = d
l.v = a
b.o = j
b.q = d
b.w = d
a.v = b
a.t = f
a.w = d
e.x = f
e.y = j
e.s = d
e.v = l
e.r = m
f.x = l
f.z = l
f.y = d
f.v = a
j.x = l
j.v = l
j.y = e
j.s = d
j.r = b
m.o = e
m.q = d
m.w = d
assert d.s.y.x.v.w.s.y.txt == "e"