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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: E = None
        self.w: I = None
        self.q: H = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: A = None
        self.w: H = None
        self.z: A = None
        self.t: B = None
        self.u: C = None
        self.p: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: D = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: D = None
        self.q: B = None
        self.s: D = None
        self.w: E = None
        self.p: H = None
        self.x: H = None
        self.z: B = None
        self.t: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: A = None
        self.r: A = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: C = None
        self.r: E = None
        self.s: A = None
        self.p: C = None
        self.o: E = None
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: E = None
        self.w: I = None
        self.q: H = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: A = None
        self.w: H = None
        self.z: A = None
        self.t: B = None
        self.u: C = None
        self.p: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: D = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: D = None
        self.q: B = None
        self.s: D = None
        self.w: E = None
        self.p: H = None
        self.x: H = None
        self.z: B = None
        self.t: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: A = None
        self.r: A = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: C = None
        self.r: E = None
        self.s: A = None
        self.p: C = None
        self.o: E = None
        self.y: B = None
        self.txt = txt

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

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