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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: E = None
        self.t: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: F = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: E = None
        self.t: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: F = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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