class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: G = None
        self.o: I = None
        self.q: E = None
        self.x: E = None
        self.w: C = None
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: E = None
        self.u: A = None
        self.t: E = None
        self.r: E = None
        self.s: E = None
        self.w: E = None
        self.o: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: D = None
        self.r: D = None
        self.p: I = None
        self.w: D = None
        self.s: H = None
        self.y: I = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: I = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: E = None
        self.u: A = None
        self.t: E = None
        self.r: E = None
        self.s: E = None
        self.w: E = None
        self.o: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: D = None
        self.r: D = None
        self.p: I = None
        self.w: D = None
        self.s: H = None
        self.y: I = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: I = None
        self.u: B = None
        self.txt = txt

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

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

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

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