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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: C = None
        self.u: H = None
        self.r: F = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: A = None
        self.p: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: D = None
        self.y: G = None
        self.q: E = None
        self.v: G = None
        self.r: E = None
        self.w: I = None
        self.s: G = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: C = None
        self.u: H = None
        self.r: F = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: A = None
        self.p: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: D = None
        self.y: G = None
        self.q: E = None
        self.v: G = None
        self.r: E = None
        self.w: I = None
        self.s: G = None
        self.x: F = None
        self.txt = txt

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

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

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