class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: F = None
        self.x: B = None
        self.o: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: F = None
        self.r: C = None
        self.p: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: F = None
        self.r: C = None
        self.p: B = None
        self.txt = txt

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

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