class A:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: I = None
        self.y: D = None
        self.v: C = None
        self.u: C = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: B = None
        self.x: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: I = None
        self.x: C = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: E = None
        self.y: F = None
        self.r: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: B = None
        self.x: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: I = None
        self.x: C = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: E = None
        self.y: F = None
        self.r: I = None
        self.txt = txt

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

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