class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: B = None
        self.x: B = None
        self.v: J = None
        self.z: E = None
        self.t: B = None
        self.y: J = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: H = None
        self.w: I = None
        self.t: J = None
        self.q: E = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: F = None
        self.u: B = None
        self.z: F = None
        self.t: J = None
        self.x: A = None
        self.y: C = None
        self.w: J = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: E = None
        self.p: F = None
        self.s: F = None
        self.o: A = None
        self.t: B = None
        self.w: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: J = None
        self.q: E = None
        self.y: F = None
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: G = None
        self.z: D = None
        self.o: I = None
        self.x: C = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: H = None
        self.w: I = None
        self.t: J = None
        self.q: E = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: F = None
        self.u: B = None
        self.z: F = None
        self.t: J = None
        self.x: A = None
        self.y: C = None
        self.w: J = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: E = None
        self.p: F = None
        self.s: F = None
        self.o: A = None
        self.t: B = None
        self.w: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: J = None
        self.q: E = None
        self.y: F = None
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: G = None
        self.z: D = None
        self.o: I = None
        self.x: C = None
        self.s: F = None
        self.txt = txt

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

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