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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: E = None
        self.q: B = None
        self.txt = txt

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

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

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

j.p = n
j.o = m
j.t = f
j.x = b
j.s = b
n.t = b
n.x = j
n.u = h
f.s = a
f.o = h
f.q = m
b.v = j
b.x = h
h.w = a
h.s = n
h.t = b
m.t = b
m.x = l
m.u = h
a.w = h
a.s = n
a.t = b
e.t = b
e.x = j
e.u = h
c.s = h
c.o = h
c.q = n
l.p = n
l.o = n
l.t = c
l.x = b
l.s = b
assert n.x.t.s.s.u.t.v.p.x.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: B = None
        self.t: C = None
        self.x: D = None
        self.s: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: E = None
        self.q: B = None
        self.txt = txt

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

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

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

j.p = n
j.o = m
j.t = f
j.x = b
j.s = b
n.t = b
n.x = j
n.u = h
f.s = a
f.o = h
f.q = m
b.v = j
b.x = h
h.w = a
h.s = n
h.t = b
m.t = b
m.x = l
m.u = h
a.w = h
a.s = n
a.t = b
e.t = b
e.x = j
e.u = h
c.s = h
c.o = h
c.q = n
l.p = n
l.o = n
l.t = c
l.x = b
l.s = b
assert n.x.t.s.s.u.t.v.p.x.txt == "j"