class A:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: B = None
        self.o: H = None
        self.v: F = None
        self.q: C = None
        self.u: E = None
        self.w: B = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: F = None
        self.u: E = None
        self.r: F = None
        self.q: E = None
        self.t: H = None
        self.v: E = None
        self.o: D = None
        self.p: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: I = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: H = None
        self.y: I = None
        self.u: G = None
        self.o: A = None
        self.w: C = None
        self.z: D = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: D = None
        self.v: G = None
        self.t: G = None
        self.s: A = None
        self.o: D = None
        self.y: I = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: A = None
        self.p: F = None
        self.w: F = None
        self.t: H = None
        self.s: E = None
        self.y: E = None
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: F = None
        self.u: E = None
        self.r: F = None
        self.q: E = None
        self.t: H = None
        self.v: E = None
        self.o: D = None
        self.p: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: I = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: H = None
        self.y: I = None
        self.u: G = None
        self.o: A = None
        self.w: C = None
        self.z: D = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: D = None
        self.v: G = None
        self.t: G = None
        self.s: A = None
        self.o: D = None
        self.y: I = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: A = None
        self.p: F = None
        self.w: F = None
        self.t: H = None
        self.s: E = None
        self.y: E = None
        self.o: C = None
        self.txt = txt

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

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