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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: I = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: B = None
        self.x: E = None
        self.y: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: D = None
        self.y: G = None
        self.u: D = None
        self.o: E = None
        self.w: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: I = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: B = None
        self.x: E = None
        self.y: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: D = None
        self.y: G = None
        self.u: D = None
        self.o: E = None
        self.w: G = None
        self.txt = txt

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

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