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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: F = None
        self.w: J = None
        self.z: I = None
        self.r: J = None
        self.u: E = None
        self.q: C = None
        self.t: I = None
        self.o: C = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: E = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: I = None
        self.u: E = None
        self.v: G = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: C = None
        self.s: D = None
        self.w: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: D = None
        self.y: E = None
        self.t: I = None
        self.s: F = None
        self.v: J = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: B = None
        self.s: I = None
        self.p: C = None
        self.v: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: E = None
        self.u: E = None
        self.z: A = None
        self.w: C = None
        self.y: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: F = None
        self.w: J = None
        self.z: I = None
        self.r: J = None
        self.u: E = None
        self.q: C = None
        self.t: I = None
        self.o: C = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: E = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: I = None
        self.u: E = None
        self.v: G = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: C = None
        self.s: D = None
        self.w: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: D = None
        self.y: E = None
        self.t: I = None
        self.s: F = None
        self.v: J = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: B = None
        self.s: I = None
        self.p: C = None
        self.v: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: E = None
        self.u: E = None
        self.z: A = None
        self.w: C = None
        self.y: E = None
        self.txt = txt

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

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