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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: B = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: B = None
        self.s: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: D = None
        self.t: E = None
        self.u: A = None
        self.o: F = None
        self.p: C = None
        self.x: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: B = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: B = None
        self.s: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: D = None
        self.t: E = None
        self.u: A = None
        self.o: F = None
        self.p: C = None
        self.x: H = None
        self.txt = txt

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

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