class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: B = None
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: G = None
        self.q: F = None
        self.r: C = None
        self.s: A = None
        self.u: J = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: B = None
        self.w: D = None
        self.r: F = None
        self.z: D = None
        self.t: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: G = None
        self.q: F = None
        self.r: C = None
        self.s: A = None
        self.u: J = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: B = None
        self.w: D = None
        self.r: F = None
        self.z: D = None
        self.t: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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