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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: D = None
        self.y: A = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: D = None
        self.q: B = None
        self.z: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: H = None
        self.z: J = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: B = None
        self.v: A = None
        self.z: A = None
        self.x: I = None
        self.q: A = None
        self.y: E = None
        self.o: A = None
        self.p: E = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: B = None
        self.t: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: D = None
        self.y: A = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: D = None
        self.q: B = None
        self.z: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: H = None
        self.z: J = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: B = None
        self.v: A = None
        self.z: A = None
        self.x: I = None
        self.q: A = None
        self.y: E = None
        self.o: A = None
        self.p: E = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: B = None
        self.t: I = None
        self.txt = txt

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

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