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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: G = None
        self.x: I = None
        self.r: I = None
        self.s: F = None
        self.p: G = None
        self.o: A = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

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

g = A("g")
j = B("j")
e = C("e")
d = D("d")
i = E("i")
l = F("l")
f = G("f")
k = H("k")
a = I("a")
n = G("n")

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: G = None
        self.x: I = None
        self.r: I = None
        self.s: F = None
        self.p: G = None
        self.o: A = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

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

g = A("g")
j = B("j")
e = C("e")
d = D("d")
i = E("i")
l = F("l")
f = G("f")
k = H("k")
a = I("a")
n = G("n")

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