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

class B:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: G = None
        self.q: I = None
        self.z: A = None
        self.v: C = None
        self.p: E = None
        self.x: F = None
        self.r: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: F = None
        self.v: G = None
        self.x: D = None
        self.w: F = None
        self.z: G = None
        self.t: I = None
        self.u: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: B = None
        self.u: B = None
        self.x: E = None
        self.txt = txt

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

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

i.z = j
i.s = k
b.u = f
b.w = h
b.q = l
b.z = i
b.v = j
b.p = g
b.r = g
b.x = d
j.r = d
j.s = d
j.w = i
j.p = h
j.t = f
j.u = g
c.s = k
c.v = k
g.s = c
g.x = c
g.p = d
g.w = d
g.v = h
g.z = h
g.t = l
g.u = b
d.v = i
d.t = f
h.p = k
h.u = j
h.r = g
h.t = g
h.s = d
h.v = f
k.s = l
k.w = f
k.u = f
k.x = g
l.q = h
f.u = b
f.w = h
f.q = l
f.z = i
f.v = j
f.p = g
f.r = g
f.x = d
assert f.z.z.u.p.t.w.s.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: G = None
        self.q: I = None
        self.z: A = None
        self.v: C = None
        self.p: E = None
        self.x: F = None
        self.r: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: F = None
        self.v: G = None
        self.x: D = None
        self.w: F = None
        self.z: G = None
        self.t: I = None
        self.u: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: B = None
        self.u: B = None
        self.x: E = None
        self.txt = txt

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

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

i.z = j
i.s = k
b.u = f
b.w = h
b.q = l
b.z = i
b.v = j
b.p = g
b.r = g
b.x = d
j.r = d
j.s = d
j.w = i
j.p = h
j.t = f
j.u = g
c.s = k
c.v = k
g.s = c
g.x = c
g.p = d
g.w = d
g.v = h
g.z = h
g.t = l
g.u = b
d.v = i
d.t = f
h.p = k
h.u = j
h.r = g
h.t = g
h.s = d
h.v = f
k.s = l
k.w = f
k.u = f
k.x = g
l.q = h
f.u = b
f.w = h
f.q = l
f.z = i
f.v = j
f.p = g
f.r = g
f.x = d
assert f.z.z.u.p.t.w.s.t.txt == "f"