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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: H = None
        self.q: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: C = None
        self.p: I = None
        self.v: A = None
        self.r: I = None
        self.t: F = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: D = None
        self.p: F = None
        self.x: H = None
        self.y: G = None
        self.txt = txt

g = A("g")
j = B("j")
h = C("h")
a = D("a")
f = E("f")
n = F("n")
l = G("l")
d = H("d")
m = I("m")

g.y = m
g.x = n
g.v = l
j.z = l
j.x = d
h.s = f
a.o = n
a.z = d
a.q = m
f.y = n
f.x = n
f.z = l
n.x = m
n.z = h
l.y = a
l.u = a
l.t = a
l.p = j
l.z = d
l.r = g
l.v = g
d.x = n
d.t = n
d.q = n
d.z = h
d.p = m
d.r = m
d.v = g
m.u = n
m.p = n
m.v = a
m.x = d
m.y = l
assert j.z.z.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: F = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: H = None
        self.q: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: C = None
        self.p: I = None
        self.v: A = None
        self.r: I = None
        self.t: F = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: D = None
        self.p: F = None
        self.x: H = None
        self.y: G = None
        self.txt = txt

g = A("g")
j = B("j")
h = C("h")
a = D("a")
f = E("f")
n = F("n")
l = G("l")
d = H("d")
m = I("m")

g.y = m
g.x = n
g.v = l
j.z = l
j.x = d
h.s = f
a.o = n
a.z = d
a.q = m
f.y = n
f.x = n
f.z = l
n.x = m
n.z = h
l.y = a
l.u = a
l.t = a
l.p = j
l.z = d
l.r = g
l.v = g
d.x = n
d.t = n
d.q = n
d.z = h
d.p = m
d.r = m
d.v = g
m.u = n
m.p = n
m.v = a
m.x = d
m.y = l
assert j.z.z.v.x.txt == "n"