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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: J = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: I = None
        self.w: C = None
        self.r: I = None
        self.y: C = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: F = None
        self.x: D = None
        self.w: E = None
        self.r: C = None
        self.o: I = None
        self.z: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: E = None
        self.z: F = None
        self.t: D = None
        self.p: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: J = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: I = None
        self.w: C = None
        self.r: I = None
        self.y: C = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: F = None
        self.x: D = None
        self.w: E = None
        self.r: C = None
        self.o: I = None
        self.z: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: E = None
        self.z: F = None
        self.t: D = None
        self.p: F = None
        self.txt = txt

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

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