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

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

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

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

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

c = A("c")
n = B("n")
j = C("j")
h = D("h")
e = E("e")

c.s = n
c.u = e
c.z = j
c.y = h
n.u = e
n.o = e
n.t = e
n.v = h
n.w = c
j.s = c
j.y = n
j.v = e
j.o = h
h.q = j
h.u = c
e.y = n
assert e.y.v.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: E = None
        self.z: C = None
        self.y: D = None
        self.txt = txt

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

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

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

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

c = A("c")
n = B("n")
j = C("j")
h = D("h")
e = E("e")

c.s = n
c.u = e
c.z = j
c.y = h
n.u = e
n.o = e
n.t = e
n.v = h
n.w = c
j.s = c
j.y = n
j.v = e
j.o = h
h.q = j
h.u = c
e.y = n
assert e.y.v.u.txt == "c"