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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: A = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: D = None
        self.t: G = None
        self.o: E = None
        self.u: A = None
        self.x: D = None
        self.z: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: C = None
        self.o: F = None
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: A = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: D = None
        self.t: G = None
        self.o: E = None
        self.u: A = None
        self.x: D = None
        self.z: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: C = None
        self.o: F = None
        self.v: B = None
        self.txt = txt

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

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