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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: H = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: J = None
        self.w: I = None
        self.q: I = None
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: G = None
        self.z: B = None
        self.r: H = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: D = None
        self.y: B = None
        self.v: C = None
        self.q: J = None
        self.s: E = None
        self.u: B = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = 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.q: G = None
        self.r: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: G = None
        self.z: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: H = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: J = None
        self.w: I = None
        self.q: I = None
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: G = None
        self.z: B = None
        self.r: H = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: D = None
        self.y: B = None
        self.v: C = None
        self.q: J = None
        self.s: E = None
        self.u: B = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = 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.q: G = None
        self.r: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: G = None
        self.z: I = None
        self.txt = txt

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

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