class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: F = None
        self.t: D = None
        self.r: B = None
        self.w: E = None
        self.q: D = None
        self.s: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: D = None
        self.o: H = None
        self.s: G = None
        self.u: E = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: D = None
        self.u: B = None
        self.o: B = None
        self.y: A = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: D = None
        self.o: H = None
        self.s: G = None
        self.u: E = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: D = None
        self.u: B = None
        self.o: B = None
        self.y: A = None
        self.v: D = None
        self.txt = txt

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

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

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

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