class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: E = None
        self.w: G = None
        self.r: H = None
        self.x: E = None
        self.q: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: F = None
        self.t: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: C = None
        self.p: C = None
        self.txt = txt

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

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

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

m = A("m")
c = B("c")
d = C("d")
j = D("j")
i = E("i")
b = F("b")
l = G("l")
a = H("a")
n = I("n")

m.v = b
m.p = i
m.x = i
m.w = l
m.r = a
m.q = d
c.x = i
c.u = b
c.o = a
d.u = j
d.y = b
d.t = c
j.q = l
j.y = l
j.x = m
j.s = d
j.u = n
j.r = i
i.x = b
i.w = m
i.y = c
i.t = j
b.v = d
b.t = d
b.p = d
l.q = i
l.y = b
a.t = m
a.y = i
a.v = i
a.o = i
a.r = l
a.q = d
a.w = j
n.y = j
n.v = j
n.o = b
n.z = a
n.t = m
n.s = d
assert c.o.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: E = None
        self.w: G = None
        self.r: H = None
        self.x: E = None
        self.q: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: F = None
        self.t: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: C = None
        self.p: C = None
        self.txt = txt

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

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

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

m = A("m")
c = B("c")
d = C("d")
j = D("j")
i = E("i")
b = F("b")
l = G("l")
a = H("a")
n = I("n")

m.v = b
m.p = i
m.x = i
m.w = l
m.r = a
m.q = d
c.x = i
c.u = b
c.o = a
d.u = j
d.y = b
d.t = c
j.q = l
j.y = l
j.x = m
j.s = d
j.u = n
j.r = i
i.x = b
i.w = m
i.y = c
i.t = j
b.v = d
b.t = d
b.p = d
l.q = i
l.y = b
a.t = m
a.y = i
a.v = i
a.o = i
a.r = l
a.q = d
a.w = j
n.y = j
n.v = j
n.o = b
n.z = a
n.t = m
n.s = d
assert c.o.o.t.txt == "j"