class A:
    def __init__(self, txt: str):
        self.t: J = None
        self.q: D = None
        self.r: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: F = None
        self.w: F = None
        self.p: A = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: J = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.p: F = None
        self.v: J = None
        self.t: G = None
        self.w: D = None
        self.r: E = None
        self.u: J = None
        self.q: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: F = None
        self.w: F = None
        self.p: A = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: J = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.p: F = None
        self.v: J = None
        self.t: G = None
        self.w: D = None
        self.r: E = None
        self.u: J = None
        self.q: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

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