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

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

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

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

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

n = A("n")
l = B("l")
h = C("h")
k = D("k")
c = E("c")
m = D("m")
g = A("g")
j = E("j")

n.t = j
n.s = h
n.w = g
n.y = k
l.p = k
l.w = m
l.x = h
l.u = n
h.w = c
h.y = c
h.o = c
h.p = g
h.r = j
k.z = l
c.w = g
c.u = l
c.o = h
m.z = l
g.t = c
g.s = h
g.w = n
g.y = k
j.w = n
j.u = l
j.o = h
assert j.u.w.z.x.r.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: C = None
        self.w: A = None
        self.y: D = None
        self.txt = txt

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

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

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

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

n = A("n")
l = B("l")
h = C("h")
k = D("k")
c = E("c")
m = D("m")
g = A("g")
j = E("j")

n.t = j
n.s = h
n.w = g
n.y = k
l.p = k
l.w = m
l.x = h
l.u = n
h.w = c
h.y = c
h.o = c
h.p = g
h.r = j
k.z = l
c.w = g
c.u = l
c.o = h
m.z = l
g.t = c
g.s = h
g.w = n
g.y = k
j.w = n
j.u = l
j.o = h
assert j.u.w.z.x.r.txt == "j"