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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: H = None
        self.t: F = None
        self.r: J = None
        self.v: E = None
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: I = None
        self.y: G = None
        self.r: A = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: I = None
        self.q: D = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: E = None
        self.x: A = None
        self.z: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: B = None
        self.u: G = None
        self.s: D = None
        self.y: A = None
        self.r: A = None
        self.t: G = None
        self.q: H = None
        self.w: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: H = None
        self.t: F = None
        self.r: J = None
        self.v: E = None
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: I = None
        self.y: G = None
        self.r: A = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: I = None
        self.q: D = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: E = None
        self.x: A = None
        self.z: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: B = None
        self.u: G = None
        self.s: D = None
        self.y: A = None
        self.r: A = None
        self.t: G = None
        self.q: H = None
        self.w: J = None
        self.txt = txt

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

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

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