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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: G = None
        self.z: F = None
        self.u: C = None
        self.t: I = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: B = None
        self.u: A = None
        self.o: H = None
        self.p: H = None
        self.t: A = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: A = None
        self.y: C = None
        self.w: B = None
        self.q: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: C = None
        self.t: E = None
        self.v: H = None
        self.q: E = None
        self.w: E = None
        self.txt = txt

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

g.w = k
g.y = k
g.u = j
g.t = j
d.q = h
d.v = k
d.z = m
d.u = b
d.t = e
d.p = j
b.x = k
b.q = d
b.s = d
b.u = g
b.t = g
b.o = f
b.p = f
h.y = e
h.o = g
j.t = d
j.w = d
j.z = g
j.y = b
j.q = h
m.w = d
m.r = f
k.v = e
k.q = d
f.z = k
f.u = b
f.r = b
f.x = b
f.o = h
f.p = g
f.y = m
f.t = d
f.q = j
e.u = k
e.r = b
e.t = j
e.q = j
e.w = j
e.v = f
assert m.w.q.y.u.q.u.x.txt == "
class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: E = None
        self.t: E = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: G = None
        self.z: F = None
        self.u: C = None
        self.t: I = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: B = None
        self.u: A = None
        self.o: H = None
        self.p: H = None
        self.t: A = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: A = None
        self.y: C = None
        self.w: B = None
        self.q: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: C = None
        self.t: E = None
        self.v: H = None
        self.q: E = None
        self.w: E = None
        self.txt = txt

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

g.w = k
g.y = k
g.u = j
g.t = j
d.q = h
d.v = k
d.z = m
d.u = b
d.t = e
d.p = j
b.x = k
b.q = d
b.s = d
b.u = g
b.t = g
b.o = f
b.p = f
h.y = e
h.o = g
j.t = d
j.w = d
j.z = g
j.y = b
j.q = h
m.w = d
m.r = f
k.v = e
k.q = d
f.z = k
f.u = b
f.r = b
f.x = b
f.o = h
f.p = g
f.y = m
f.t = d
f.q = j
e.u = k
e.r = b
e.t = j
e.q = j
e.w = j
e.v = f
assert m.w.q.y.u.q.u.x.txt == "k"