class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: F = None
        self.r: I = None
        self.q: E = None
        self.z: C = None
        self.w: E = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.t: A = None
        self.y: D = None
        self.r: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: A = None
        self.z: C = None
        self.t: B = None
        self.p: A = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: I = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: J = None
        self.t: F = None
        self.x: I = None
        self.p: D = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.r: D = None
        self.z: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: C = None
        self.s: B = None
        self.w: I = None
        self.y: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.t: A = None
        self.y: D = None
        self.r: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: A = None
        self.z: C = None
        self.t: B = None
        self.p: A = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: I = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: J = None
        self.t: F = None
        self.x: I = None
        self.p: D = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.r: D = None
        self.z: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: C = None
        self.s: B = None
        self.w: I = None
        self.y: A = None
        self.txt = txt

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

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