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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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