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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: E = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: F = None
        self.q: C = None
        self.t: A = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: B = None
        self.r: C = None
        self.q: C = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: F = None
        self.x: C = None
        self.o: A = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: C = None
        self.o: A = None
        self.s: E = None
        self.txt = txt

n = A("n")
d = B("d")
m = C("m")
b = D("b")
i = E("i")
l = F("l")
c = C("c")
g = B("g")
k = B("k")

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: E = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: F = None
        self.q: C = None
        self.t: A = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: B = None
        self.r: C = None
        self.q: C = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: F = None
        self.x: C = None
        self.o: A = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: C = None
        self.o: A = None
        self.s: E = None
        self.txt = txt

n = A("n")
d = B("d")
m = C("m")
b = D("b")
i = E("i")
l = F("l")
c = C("c")
g = B("g")
k = B("k")

n.p = l
n.y = b
n.w = g
d.s = b
d.y = i
d.r = l
m.o = d
m.u = l
m.s = l
m.q = c
m.t = n
b.w = d
b.u = d
b.r = m
b.q = m
b.v = l
i.w = b
i.t = l
i.x = m
i.r = m
i.o = n
l.w = b
l.u = m
l.o = n
l.s = i
c.o = g
c.u = l
c.s = l
c.q = m
c.t = n
g.s = b
g.y = i
g.r = l
k.s = b
k.y = i
k.r = l
assert b.q.o.y.w.v.o.txt == "n"