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

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

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

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

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

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

b.u = k
b.w = e
b.x = e
h.q = n
h.v = n
h.y = k
h.w = b
k.s = b
k.q = e
e.v = k
c.z = b
c.y = e
n.q = h
n.v = h
n.y = k
n.w = b
assert b.u.q.v.q.v.q.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: D = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

b.u = k
b.w = e
b.x = e
h.q = n
h.v = n
h.y = k
h.w = b
k.s = b
k.q = e
e.v = k
c.z = b
c.y = e
n.q = h
n.v = h
n.y = k
n.w = b
assert b.u.q.v.q.v.q.txt == "e"