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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: G = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: A = None
        self.s: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: G = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: A = None
        self.s: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: E = None
        self.txt = txt

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

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