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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: D = None
        self.u: H = None
        self.p: G = None
        self.y: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: G = None
        self.w: A = None
        self.o: F = None
        self.z: A = None
        self.q: C = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: D = None
        self.u: H = None
        self.p: G = None
        self.y: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: G = None
        self.w: A = None
        self.o: F = None
        self.z: A = None
        self.q: C = None
        self.p: G = None
        self.txt = txt

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

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