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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: C = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: C = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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