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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: G = None
        self.s: I = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: H = None
        self.p: D = None
        self.v: G = None
        self.z: B = None
        self.t: I = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: A = None
        self.q: G = None
        self.o: B = None
        self.z: G = None
        self.p: D = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: I = None
        self.p: F = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: H = None
        self.u: C = None
        self.t: B = None
        self.x: A = None
        self.o: F = None
        self.v: F = None
        self.txt = txt

e = A("e")
j = B("j")
c = C("c")
i = D("i")
a = E("a")
f = F("f")
h = G("h")
d = H("d")
n = I("n")
k = H("k")

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: G = None
        self.s: I = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: H = None
        self.p: D = None
        self.v: G = None
        self.z: B = None
        self.t: I = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: A = None
        self.q: G = None
        self.o: B = None
        self.z: G = None
        self.p: D = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: I = None
        self.p: F = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: H = None
        self.u: C = None
        self.t: B = None
        self.x: A = None
        self.o: F = None
        self.v: F = None
        self.txt = txt

e = A("e")
j = B("j")
c = C("c")
i = D("i")
a = E("a")
f = F("f")
h = G("h")
d = H("d")
n = I("n")
k = H("k")

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