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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: D = None
        self.w: B = None
        self.y: B = None
        self.p: A = None
        self.txt = txt

n = A("n")
i = B("i")
a = C("a")
g = D("g")
f = E("f")
k = C("k")
l = B("l")
d = D("d")

n.o = f
n.y = f
n.x = g
i.t = f
i.p = f
i.q = l
a.x = f
a.u = k
a.q = k
a.t = d
a.s = n
g.v = a
g.o = k
g.s = i
g.p = i
g.x = f
f.v = g
f.u = g
f.w = i
f.y = l
f.p = n
k.x = f
k.u = a
k.q = a
k.t = d
k.s = n
l.t = f
l.p = f
l.q = i
d.v = a
d.o = k
d.s = i
d.p = i
d.x = f
assert k.t.v.x.v.x.y.t.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: E = None
        self.x: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: D = None
        self.w: B = None
        self.y: B = None
        self.p: A = None
        self.txt = txt

n = A("n")
i = B("i")
a = C("a")
g = D("g")
f = E("f")
k = C("k")
l = B("l")
d = D("d")

n.o = f
n.y = f
n.x = g
i.t = f
i.p = f
i.q = l
a.x = f
a.u = k
a.q = k
a.t = d
a.s = n
g.v = a
g.o = k
g.s = i
g.p = i
g.x = f
f.v = g
f.u = g
f.w = i
f.y = l
f.p = n
k.x = f
k.u = a
k.q = a
k.t = d
k.s = n
l.t = f
l.p = f
l.q = i
d.v = a
d.o = k
d.s = i
d.p = i
d.x = f
assert k.t.v.x.v.x.y.t.txt == "f"