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

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: A = None
        self.v: F = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: E = None
        self.w: D = None
        self.y: F = None
        self.x: C = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: A = None
        self.v: F = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: E = None
        self.w: D = None
        self.y: F = None
        self.x: C = None
        self.u: E = None
        self.txt = txt

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

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

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