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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: C = None
        self.y: I = None
        self.q: A = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: F = None
        self.x: I = None
        self.v: B = None
        self.w: H = None
        self.s: A = None
        self.t: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: F = None
        self.o: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: C = None
        self.y: I = None
        self.q: A = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: F = None
        self.x: I = None
        self.v: B = None
        self.w: H = None
        self.s: A = None
        self.t: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: F = None
        self.o: A = None
        self.txt = txt

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

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

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