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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: A = None
        self.w: I = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: J = None
        self.w: F = None
        self.z: G = None
        self.q: A = None
        self.x: E = None
        self.p: I = None
        self.u: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: E = None
        self.p: B = None
        self.w: J = None
        self.s: G = None
        self.x: B = None
        self.z: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: E = None
        self.p: J = None
        self.r: B = None
        self.u: B = None
        self.o: J = None
        self.v: I = None
        self.z: H = None
        self.q: I = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: F = None
        self.z: B = None
        self.v: B = None
        self.q: B = None
        self.t: I = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: C = None
        self.r: G = None
        self.x: G = None
        self.s: J = None
        self.p: F = None
        self.y: G = None
        self.t: B = None
        self.u: D = None
        self.q: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: I = None
        self.s: D = None
        self.r: C = None
        self.p: I = None
        self.z: H = None
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: A = None
        self.w: I = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: J = None
        self.w: F = None
        self.z: G = None
        self.q: A = None
        self.x: E = None
        self.p: I = None
        self.u: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: E = None
        self.p: B = None
        self.w: J = None
        self.s: G = None
        self.x: B = None
        self.z: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: E = None
        self.p: J = None
        self.r: B = None
        self.u: B = None
        self.o: J = None
        self.v: I = None
        self.z: H = None
        self.q: I = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: F = None
        self.z: B = None
        self.v: B = None
        self.q: B = None
        self.t: I = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: C = None
        self.r: G = None
        self.x: G = None
        self.s: J = None
        self.p: F = None
        self.y: G = None
        self.t: B = None
        self.u: D = None
        self.q: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: I = None
        self.s: D = None
        self.r: C = None
        self.p: I = None
        self.z: H = None
        self.u: C = None
        self.txt = txt

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

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