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

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

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

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

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

n = A("n")
j = B("j")
m = C("m")
i = D("i")
l = E("l")
d = E("d")
h = E("h")
g = A("g")

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

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

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

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

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

n = A("n")
j = B("j")
m = C("m")
i = D("i")
l = E("l")
d = E("d")
h = E("h")
g = A("g")

n.p = i
n.t = g
n.y = j
j.t = i
j.r = m
j.y = g
m.y = j
m.t = i
m.v = d
i.o = j
i.y = j
i.u = l
i.x = g
l.v = h
l.p = i
l.t = i
l.s = j
d.v = l
d.p = i
d.t = i
d.s = j
h.v = l
h.p = i
h.t = i
h.s = j
g.p = i
g.t = n
g.y = j
assert g.p.y.y.p.u.t.txt == "i"