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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: E = None
        self.w: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: J = None
        self.r: A = None
        self.p: G = None
        self.y: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: D = None
        self.q: I = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: G = None
        self.r: J = None
        self.o: B = None
        self.t: F = None
        self.z: H = None
        self.u: A = None
        self.q: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: E = None
        self.w: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: J = None
        self.r: A = None
        self.p: G = None
        self.y: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: D = None
        self.q: I = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: G = None
        self.r: J = None
        self.o: B = None
        self.t: F = None
        self.z: H = None
        self.u: A = None
        self.q: H = None
        self.txt = txt

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

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

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