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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: I = None
        self.t: I = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: I = None
        self.t: I = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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