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

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: H = None
        self.p: E = None
        self.s: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: B = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: A = None
        self.w: C = None
        self.s: D = None
        self.y: A = None
        self.t: D = None
        self.z: I = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: H = None
        self.p: E = None
        self.s: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: B = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: A = None
        self.w: C = None
        self.s: D = None
        self.y: A = None
        self.t: D = None
        self.z: I = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: D = None
        self.txt = txt

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

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