class A:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: F = None
        self.w: F = None
        self.x: E = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: E = None
        self.s: D = None
        self.t: A = None
        self.x: A = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: C = None
        self.r: C = None
        self.o: C = None
        self.p: G = None
        self.z: A = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: E = None
        self.r: B = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: D = None
        self.s: B = None
        self.o: C = None
        self.u: C = None
        self.z: I = None
        self.txt = txt

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

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

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

a.r = c
a.s = f
a.w = f
a.x = d
a.y = j
j.y = k
j.t = g
j.p = g
j.o = n
j.v = d
j.w = e
j.q = e
e.w = l
e.z = d
e.s = n
e.u = n
e.t = a
e.x = a
n.q = k
n.y = e
n.r = e
n.o = e
n.p = g
n.z = c
n.v = f
d.w = j
d.o = l
f.t = n
f.z = d
f.r = j
f.p = k
g.v = f
g.x = n
g.s = j
g.o = e
g.u = e
g.z = l
k.u = e
l.x = k
l.s = k
l.p = f
l.r = f
l.t = f
l.y = e
l.v = j
c.r = a
c.s = f
c.w = f
c.x = d
c.y = j
assert c.r.w.z.w.txt == "
class A:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: F = None
        self.w: F = None
        self.x: E = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: E = None
        self.s: D = None
        self.t: A = None
        self.x: A = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: C = None
        self.r: C = None
        self.o: C = None
        self.p: G = None
        self.z: A = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: E = None
        self.r: B = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: D = None
        self.s: B = None
        self.o: C = None
        self.u: C = None
        self.z: I = None
        self.txt = txt

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

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

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

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