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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: I = None
        self.s: B = None
        self.z: D = None
        self.u: H = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: F = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: I = None
        self.s: B = None
        self.z: D = None
        self.u: H = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: F = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

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