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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: E = None
        self.y: A = None
        self.x: H = None
        self.p: I = None
        self.t: E = None
        self.z: E = None
        self.r: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: B = None
        self.y: D = None
        self.p: A = None
        self.w: C = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: G = None
        self.w: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: I = None
        self.r: B = None
        self.v: B = None
        self.t: C = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: D = None
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: E = None
        self.y: A = None
        self.x: H = None
        self.p: I = None
        self.t: E = None
        self.z: E = None
        self.r: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: B = None
        self.y: D = None
        self.p: A = None
        self.w: C = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: G = None
        self.w: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: I = None
        self.r: B = None
        self.v: B = None
        self.t: C = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: D = None
        self.x: F = None
        self.txt = txt

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

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