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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: A = None
        self.o: C = None
        self.v: D = None
        self.t: E = None
        self.p: C = None
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: B = None
        self.o: H = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: I = None
        self.v: G = None
        self.r: C = None
        self.p: B = None
        self.w: C = None
        self.z: A = None
        self.q: I = None
        self.o: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: D = None
        self.s: A = None
        self.q: C = None
        self.o: H = None
        self.w: B = None
        self.p: E = None
        self.u: B = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: A = None
        self.o: C = None
        self.v: D = None
        self.t: E = None
        self.p: C = None
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: B = None
        self.o: H = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: I = None
        self.v: G = None
        self.r: C = None
        self.p: B = None
        self.w: C = None
        self.z: A = None
        self.q: I = None
        self.o: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: D = None
        self.s: A = None
        self.q: C = None
        self.o: H = None
        self.w: B = None
        self.p: E = None
        self.u: B = None
        self.z: A = None
        self.txt = txt

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

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