class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: E = None
        self.x: I = None
        self.w: C = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: C = None
        self.o: C = None
        self.s: I = None
        self.p: D = None
        self.z: E = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: A = None
        self.p: D = None
        self.q: G = None
        self.o: G = None
        self.x: I = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: E = None
        self.u: H = None
        self.z: G = None
        self.r: D = None
        self.x: C = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: I = None
        self.w: I = None
        self.z: I = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: E = None
        self.r: A = None
        self.y: C = None
        self.u: B = None
        self.w: E = None
        self.o: A = None
        self.s: C = None
        self.x: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: C = None
        self.o: C = None
        self.s: I = None
        self.p: D = None
        self.z: E = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: A = None
        self.p: D = None
        self.q: G = None
        self.o: G = None
        self.x: I = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: E = None
        self.u: H = None
        self.z: G = None
        self.r: D = None
        self.x: C = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: I = None
        self.w: I = None
        self.z: I = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: E = None
        self.r: A = None
        self.y: C = None
        self.u: B = None
        self.w: E = None
        self.o: A = None
        self.s: C = None
        self.x: H = None
        self.txt = txt

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

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

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

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