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

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

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

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

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

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

f.t = l
f.o = a
f.w = c
f.s = c
f.y = k
l.x = j
l.r = c
l.t = c
e.p = n
c.o = h
h.o = c
h.s = e
h.p = j
k.o = c
k.s = n
k.p = j
a.t = j
a.o = f
a.w = c
a.s = c
a.y = h
j.x = l
j.r = c
j.t = c
n.p = e
assert h.p.x.x.r.o.p.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: A = None
        self.w: D = None
        self.y: E = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

f.t = l
f.o = a
f.w = c
f.s = c
f.y = k
l.x = j
l.r = c
l.t = c
e.p = n
c.o = h
h.o = c
h.s = e
h.p = j
k.o = c
k.s = n
k.p = j
a.t = j
a.o = f
a.w = c
a.s = c
a.y = h
j.x = l
j.r = c
j.t = c
n.p = e
assert h.p.x.x.r.o.p.txt == "j"