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

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

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

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

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

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

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

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

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

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

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

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

k.x = c
k.s = l
k.p = e
k.y = j
l.t = e
e.q = c
e.t = k
e.u = k
e.x = j
e.s = h
j.z = l
j.w = l
j.t = k
c.v = l
c.t = k
c.z = e
h.q = c
h.t = k
h.u = k
h.x = j
h.s = e
assert e.t.p.s.u.txt == "k"