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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: D = None
        self.v: C = None
        self.txt = txt

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

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

j = A("j")
f = B("f")
h = C("h")
n = D("n")
g = E("g")
k = F("k")
d = A("d")
e = D("e")

j.x = h
j.t = h
j.q = h
j.o = g
j.w = g
j.y = d
f.s = n
f.v = n
f.u = h
f.y = e
f.x = e
f.q = g
h.w = g
n.p = k
n.w = e
n.v = h
g.x = h
g.y = k
g.z = n
k.s = f
k.p = g
d.x = h
d.t = h
d.q = h
d.o = g
d.w = g
d.y = j
e.p = k
e.w = n
e.v = h
assert n.v.w.x.w.x.w.z.p.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: E = None
        self.t: C = None
        self.q: C = None
        self.w: E = None
        self.y: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: D = None
        self.v: C = None
        self.txt = txt

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

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

j = A("j")
f = B("f")
h = C("h")
n = D("n")
g = E("g")
k = F("k")
d = A("d")
e = D("e")

j.x = h
j.t = h
j.q = h
j.o = g
j.w = g
j.y = d
f.s = n
f.v = n
f.u = h
f.y = e
f.x = e
f.q = g
h.w = g
n.p = k
n.w = e
n.v = h
g.x = h
g.y = k
g.z = n
k.s = f
k.p = g
d.x = h
d.t = h
d.q = h
d.o = g
d.w = g
d.y = j
e.p = k
e.w = n
e.v = h
assert n.v.w.x.w.x.w.z.p.txt == "k"