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

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

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

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

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

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

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

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

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

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

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

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

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