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

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

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

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

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

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

k.v = l
k.u = l
k.s = m
l.x = g
h.u = n
h.y = m
h.o = f
g.w = m
g.t = b
m.s = l
m.w = g
m.y = n
b.x = g
n.v = b
n.u = b
n.s = m
f.u = k
f.y = m
f.o = h
j.u = k
j.y = m
j.o = h
assert h.u.u.x.w.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: E = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

k.v = l
k.u = l
k.s = m
l.x = g
h.u = n
h.y = m
h.o = f
g.w = m
g.t = b
m.s = l
m.w = g
m.y = n
b.x = g
n.v = b
n.u = b
n.s = m
f.u = k
f.y = m
f.o = h
j.u = k
j.y = m
j.o = h
assert h.u.u.x.w.txt == "m"