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

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: G = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: J = None
        self.x: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: C = None
        self.y: C = None
        self.u: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

j.z = i
j.s = c
c.t = j
c.r = b
c.s = k
c.y = i
m.v = h
m.x = d
m.y = c
i.q = d
i.z = c
i.y = n
g.z = n
g.y = k
g.x = k
n.t = i
n.s = m
n.y = m
n.u = j
d.p = c
d.s = j
b.q = n
b.z = n
b.x = h
b.v = j
b.p = c
b.y = d
h.p = b
k.u = c
assert g.z.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: G = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: J = None
        self.x: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: C = None
        self.y: C = None
        self.u: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

j.z = i
j.s = c
c.t = j
c.r = b
c.s = k
c.y = i
m.v = h
m.x = d
m.y = c
i.q = d
i.z = c
i.y = n
g.z = n
g.y = k
g.x = k
n.t = i
n.s = m
n.y = m
n.u = j
d.p = c
d.s = j
b.q = n
b.z = n
b.x = h
b.v = j
b.p = c
b.y = d
h.p = b
k.u = c
assert g.z.y.y.txt == "c"