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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: F = None
        self.y: I = None
        self.u: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: A = None
        self.u: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: E = None
        self.s: G = None
        self.w: I = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: F = None
        self.y: I = None
        self.u: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: A = None
        self.u: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: E = None
        self.s: G = None
        self.w: I = None
        self.txt = txt

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

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

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