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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: A = None
        self.z: G = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: B = None
        self.v: F = None
        self.z: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: B = None
        self.v: J = None
        self.t: H = None
        self.u: A = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: B = None
        self.o: I = None
        self.q: I = None
        self.v: F = None
        self.u: I = None
        self.t: G = None
        self.txt = txt

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

f.x = e
f.p = e
f.t = d
f.z = n
f.w = n
f.o = i
f.v = g
f.s = m
i.v = m
h.z = d
h.v = d
h.p = m
h.x = m
h.y = k
h.r = k
h.t = a
h.s = e
h.w = g
h.u = g
k.y = d
k.r = n
n.r = f
n.x = f
n.z = d
n.w = k
e.v = k
e.z = h
e.q = m
e.y = n
d.x = h
d.r = i
d.v = e
d.z = g
m.v = n
m.x = i
m.t = h
m.z = h
m.s = k
m.w = k
m.p = a
m.y = e
m.u = d
a.z = f
a.u = f
a.o = i
a.v = g
a.t = m
a.p = k
g.r = a
g.o = a
g.q = a
g.u = a
g.x = i
g.v = e
g.t = d
assert f.z.w.r.w.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: G = None
        self.z: E = None
        self.w: E = None
        self.p: F = None
        self.o: B = None
        self.v: J = None
        self.s: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: A = None
        self.z: G = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: B = None
        self.v: F = None
        self.z: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: B = None
        self.v: J = None
        self.t: H = None
        self.u: A = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: B = None
        self.o: I = None
        self.q: I = None
        self.v: F = None
        self.u: I = None
        self.t: G = None
        self.txt = txt

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

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