class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: E = None
        self.q: C = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: H = None
        self.u: I = None
        self.w: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: G = None
        self.u: B = None
        self.p: A = None
        self.x: H = None
        self.w: H = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: J = None
        self.u: D = None
        self.t: C = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: E = None
        self.x: D = None
        self.t: C = None
        self.v: F = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: H = None
        self.u: I = None
        self.w: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: G = None
        self.u: B = None
        self.p: A = None
        self.x: H = None
        self.w: H = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: J = None
        self.u: D = None
        self.t: C = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: E = None
        self.x: D = None
        self.t: C = None
        self.v: F = None
        self.y: E = None
        self.txt = txt

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

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

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

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