class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: G = None
        self.w: B = None
        self.q: H = None
        self.p: E = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.o: C = None
        self.r: H = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: J = None
        self.r: I = None
        self.s: G = None
        self.y: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: G = None
        self.v: D = None
        self.r: D = None
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: H = None
        self.z: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.o: C = None
        self.r: H = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: J = None
        self.r: I = None
        self.s: G = None
        self.y: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: G = None
        self.v: D = None
        self.r: D = None
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: H = None
        self.z: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: H = None
        self.txt = txt

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

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

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