class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: I = None
        self.v: D = None
        self.s: C = None
        self.u: G = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: B = None
        self.t: C = None
        self.r: D = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: B = None
        self.t: C = None
        self.r: D = None
        self.x: A = None
        self.txt = txt

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

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

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