class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: C = None
        self.v: A = None
        self.txt = txt

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

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

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

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

a.o = l
a.p = c
c.q = a
c.w = i
c.u = d
c.s = d
c.y = d
c.x = b
c.r = l
c.p = l
c.t = k
l.y = j
l.o = d
l.t = a
k.v = a
k.y = i
k.r = i
k.x = l
k.s = c
k.o = b
k.p = m
d.w = c
d.y = k
d.p = b
d.x = b
d.z = j
d.u = j
d.t = l
d.r = i
d.o = m
m.r = j
m.q = l
m.v = a
i.v = d
i.s = m
j.z = k
j.r = l
j.w = m
j.s = m
j.q = c
j.x = c
j.v = b
j.p = b
b.v = m
b.y = i
b.r = i
b.w = k
b.q = j
b.s = j
b.u = c
b.x = a
b.p = l
assert i.s.r.w.v.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: C = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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