class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: D = None
        self.u: E = None
        self.y: I = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: B = None
        self.v: H = None
        self.q: D = None
        self.o: A = None
        self.y: F = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: A = None
        self.w: A = None
        self.v: I = None
        self.x: H = None
        self.z: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: C = None
        self.t: H = None
        self.u: B = None
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: B = None
        self.v: H = None
        self.q: D = None
        self.o: A = None
        self.y: F = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: A = None
        self.w: A = None
        self.v: I = None
        self.x: H = None
        self.z: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: C = None
        self.t: H = None
        self.u: B = None
        self.o: B = None
        self.txt = txt

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

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