class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: F = None
        self.r: G = None
        self.y: I = None
        self.q: D = None
        self.o: C = None
        self.x: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: E = None
        self.z: B = None
        self.y: I = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: F = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: E = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: A = None
        self.x: E = None
        self.v: G = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: D = None
        self.p: G = None
        self.r: G = None
        self.u: D = None
        self.x: B = None
        self.t: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: E = None
        self.z: B = None
        self.y: I = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: F = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: E = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: A = None
        self.x: E = None
        self.v: G = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: D = None
        self.p: G = None
        self.r: G = None
        self.u: D = None
        self.x: B = None
        self.t: E = None
        self.txt = txt

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

b.t = a
b.q = a
b.w = d
b.r = f
b.y = e
b.x = e
b.o = n
g.t = d
n.y = m
a.o = i
a.p = i
a.z = g
a.y = e
a.u = d
i.w = e
i.q = d
i.p = g
d.z = e
d.t = i
d.x = m
f.r = e
c.q = m
c.o = b
c.x = i
c.v = f
c.w = a
e.o = d
e.v = a
e.u = a
e.p = f
e.r = f
e.x = g
e.t = i
m.y = n
assert n.y.y.y.txt == "m"