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

class B:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: G = None
        self.w: A = None
        self.t: F = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: I = None
        self.q: B = None
        self.v: F = None
        self.r: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: C = None
        self.w: C = None
        self.y: C = None
        self.r: G = None
        self.p: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: G = None
        self.w: A = None
        self.t: F = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: I = None
        self.q: B = None
        self.v: F = None
        self.r: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: C = None
        self.w: C = None
        self.y: C = None
        self.r: G = None
        self.p: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: A = None
        self.txt = txt

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

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