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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: I = None
        self.o: B = None
        self.y: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: F = None
        self.r: D = None
        self.w: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: I = None
        self.o: B = None
        self.y: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: F = None
        self.r: D = None
        self.w: A = None
        self.txt = txt

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

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

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