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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: H = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: I = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: E = None
        self.u: I = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: I = None
        self.r: A = None
        self.p: I = None
        self.s: H = None
        self.v: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: H = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: I = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: E = None
        self.u: I = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: I = None
        self.r: A = None
        self.p: I = None
        self.s: H = None
        self.v: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: D = None
        self.txt = txt

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

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