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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: G = None
        self.o: F = None
        self.y: A = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: I = None
        self.q: F = None
        self.p: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: J = None
        self.p: J = None
        self.o: B = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: E = None
        self.r: H = None
        self.txt = txt

c = A("c")
i = B("i")
k = C("k")
l = D("l")
f = E("f")
h = F("h")
e = G("e")
j = H("j")
n = I("n")
d = J("d")

c.t = k
i.p = n
i.w = e
i.y = e
i.q = k
i.v = d
i.r = d
i.s = j
i.z = j
i.x = f
k.x = j
k.t = e
k.o = h
k.y = c
k.w = i
l.r = c
f.x = j
f.o = n
f.q = h
f.p = d
h.r = c
h.y = l
e.v = c
e.u = c
e.x = l
j.y = f
j.p = l
n.v = k
n.q = d
n.p = d
n.o = i
n.z = e
d.p = f
d.o = f
d.r = j
assert i.z.p.r.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: G = None
        self.o: F = None
        self.y: A = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: I = None
        self.q: F = None
        self.p: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: J = None
        self.p: J = None
        self.o: B = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: E = None
        self.r: H = None
        self.txt = txt

c = A("c")
i = B("i")
k = C("k")
l = D("l")
f = E("f")
h = F("h")
e = G("e")
j = H("j")
n = I("n")
d = J("d")

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