class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: B = None
        self.t: A = None
        self.s: B = None
        self.w: F = None
        self.y: G = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: A = None
        self.p: I = None
        self.v: H = None
        self.r: I = None
        self.z: H = None
        self.y: D = None
        self.o: A = None
        self.q: I = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: H = None
        self.x: H = None
        self.t: D = None
        self.q: D = None
        self.w: C = None
        self.u: D = None
        self.o: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: A = None
        self.p: I = None
        self.v: H = None
        self.r: I = None
        self.z: H = None
        self.y: D = None
        self.o: A = None
        self.q: I = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: H = None
        self.x: H = None
        self.t: D = None
        self.q: D = None
        self.w: C = None
        self.u: D = None
        self.o: H = None
        self.txt = txt

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

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