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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: B = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: H = None
        self.y: G = None
        self.q: D = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: E = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: D = None
        self.s: I = None
        self.z: B = None
        self.x: F = None
        self.p: I = None
        self.q: A = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: H = None
        self.o: G = None
        self.z: B = None
        self.q: H = None
        self.v: G = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: B = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: H = None
        self.y: G = None
        self.q: D = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: E = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: D = None
        self.s: I = None
        self.z: B = None
        self.x: F = None
        self.p: I = None
        self.q: A = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: H = None
        self.o: G = None
        self.z: B = None
        self.q: H = None
        self.v: G = None
        self.y: B = None
        self.txt = txt

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

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