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

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: J = None
        self.s: G = None
        self.p: F = None
        self.z: H = None
        self.r: C = None
        self.y: C = None
        self.w: C = None
        self.v: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.q: D = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: J = None
        self.o: D = None
        self.y: B = None
        self.q: D = None
        self.t: H = None
        self.w: A = None
        self.v: I = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: G = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: H = None
        self.w: C = None
        self.o: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: E = None
        self.v: D = None
        self.z: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: J = None
        self.s: G = None
        self.p: F = None
        self.z: H = None
        self.r: C = None
        self.y: C = None
        self.w: C = None
        self.v: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.q: D = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: J = None
        self.o: D = None
        self.y: B = None
        self.q: D = None
        self.t: H = None
        self.w: A = None
        self.v: I = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: G = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: H = None
        self.w: C = None
        self.o: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: E = None
        self.v: D = None
        self.z: C = None
        self.txt = txt

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

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