class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: C = None
        self.p: J = None
        self.t: B = None
        self.s: I = None
        self.o: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: H = None
        self.t: E = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.z: J = None
        self.r: J = None
        self.u: I = None
        self.v: I = None
        self.w: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: B = None
        self.p: I = None
        self.o: F = None
        self.t: B = None
        self.w: I = None
        self.v: E = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: F = None
        self.t: B = None
        self.x: I = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: J = None
        self.o: A = None
        self.r: D = None
        self.v: G = None
        self.u: D = None
        self.s: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: H = None
        self.t: E = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.z: J = None
        self.r: J = None
        self.u: I = None
        self.v: I = None
        self.w: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: B = None
        self.p: I = None
        self.o: F = None
        self.t: B = None
        self.w: I = None
        self.v: E = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: F = None
        self.t: B = None
        self.x: I = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: J = None
        self.o: A = None
        self.r: D = None
        self.v: G = None
        self.u: D = None
        self.s: E = None
        self.txt = txt

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

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

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