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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: D = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: A = None
        self.w: J = None
        self.v: F = None
        self.q: I = None
        self.p: J = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: F = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: A = None
        self.w: I = None
        self.t: C = None
        self.u: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: D = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: A = None
        self.w: J = None
        self.v: F = None
        self.q: I = None
        self.p: J = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: F = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: A = None
        self.w: I = None
        self.t: C = None
        self.u: E = None
        self.txt = txt

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

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

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

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