class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: A = None
        self.u: F = None
        self.t: A = None
        self.x: H = None
        self.s: G = None
        self.q: E = None
        self.r: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: A = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: G = None
        self.t: G = None
        self.w: D = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.r: H = None
        self.o: H = None
        self.txt = txt

m = A("m")
d = B("d")
g = C("g")
h = D("h")
f = E("f")
c = F("c")
n = G("n")
l = H("l")
b = A("b")
j = H("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: A = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: G = None
        self.t: G = None
        self.w: D = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.r: H = None
        self.o: H = None
        self.txt = txt

m = A("m")
d = B("d")
g = C("g")
h = D("h")
f = E("f")
c = F("c")
n = G("n")
l = H("l")
b = A("b")
j = H("j")

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