class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: A = None
        self.p: I = None
        self.w: A = None
        self.o: F = None
        self.z: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: A = None
        self.p: I = None
        self.w: A = None
        self.o: F = None
        self.z: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: D = None
        self.txt = txt

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

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

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