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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: C = None
        self.z: I = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: I = None
        self.t: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: F = None
        self.v: B = None
        self.y: G = None
        self.q: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: G = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: C = None
        self.z: I = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: I = None
        self.t: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: F = None
        self.v: B = None
        self.y: G = None
        self.q: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: G = None
        self.u: E = None
        self.txt = txt

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

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