class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: F = None
        self.o: B = None
        self.z: J = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: D = None
        self.p: J = None
        self.z: A = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: J = None
        self.s: I = None
        self.v: D = None
        self.t: F = None
        self.r: A = None
        self.w: F = None
        self.u: F = None
        self.o: A = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: E = None
        self.o: C = None
        self.q: E = None
        self.p: H = None
        self.u: E = None
        self.z: J = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: F = None
        self.u: G = None
        self.z: I = None
        self.r: B = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: C = None
        self.z: E = None
        self.u: A = None
        self.t: H = None
        self.v: A = None
        self.w: A = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: C = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: C = None
        self.r: B = None
        self.v: H = None
        self.x: B = None
        self.y: E = None
        self.t: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: D = None
        self.p: J = None
        self.z: A = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: J = None
        self.s: I = None
        self.v: D = None
        self.t: F = None
        self.r: A = None
        self.w: F = None
        self.u: F = None
        self.o: A = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: E = None
        self.o: C = None
        self.q: E = None
        self.p: H = None
        self.u: E = None
        self.z: J = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: F = None
        self.u: G = None
        self.z: I = None
        self.r: B = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: C = None
        self.z: E = None
        self.u: A = None
        self.t: H = None
        self.v: A = None
        self.w: A = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: C = None
        self.x: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: C = None
        self.r: B = None
        self.v: H = None
        self.x: B = None
        self.y: E = None
        self.t: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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