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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: F = None
        self.t: D = None
        self.u: E = None
        self.z: F = None
        self.w: A = None
        self.v: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: G = None
        self.r: F = None
        self.v: G = None
        self.w: I = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: F = None
        self.t: D = None
        self.u: E = None
        self.z: F = None
        self.w: A = None
        self.v: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: G = None
        self.r: F = None
        self.v: G = None
        self.w: I = None
        self.z: F = None
        self.txt = txt

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

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

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