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

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

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

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

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

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

i.t = j
i.r = j
i.p = k
i.x = h
l.t = j
l.r = k
l.z = n
c.s = i
c.p = h
k.o = l
k.x = m
k.u = m
k.v = e
n.o = m
n.v = b
b.s = i
b.p = l
j.t = i
j.r = i
j.p = m
j.x = h
e.s = i
e.p = h
m.o = l
m.x = k
m.u = k
m.v = c
h.t = j
h.r = m
h.z = n
assert j.r.p.v.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: D = None
        self.x: B = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

i.t = j
i.r = j
i.p = k
i.x = h
l.t = j
l.r = k
l.z = n
c.s = i
c.p = h
k.o = l
k.x = m
k.u = m
k.v = e
n.o = m
n.v = b
b.s = i
b.p = l
j.t = i
j.r = i
j.p = m
j.x = h
e.s = i
e.p = h
m.o = l
m.x = k
m.u = k
m.v = c
h.t = j
h.r = m
h.z = n
assert j.r.p.v.s.txt == "i"