class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: G = None
        self.o: G = None
        self.r: E = None
        self.u: I = None
        self.x: C = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: H = None
        self.o: E = None
        self.q: I = None
        self.z: A = None
        self.y: D = None
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: E = None
        self.p: E = None
        self.y: C = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: C = None
        self.t: H = None
        self.w: H = None
        self.o: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: H = None
        self.o: E = None
        self.q: I = None
        self.z: A = None
        self.y: D = None
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: E = None
        self.p: E = None
        self.y: C = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: C = None
        self.t: H = None
        self.w: H = None
        self.o: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: F = None
        self.txt = txt

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

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

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