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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: I = None
        self.x: D = None
        self.s: A = None
        self.w: C = None
        self.q: I = None
        self.o: I = None
        self.z: I = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: F = None
        self.u: J = None
        self.o: H = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: H = None
        self.u: F = None
        self.v: E = None
        self.x: C = None
        self.w: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: G = None
        self.t: B = None
        self.y: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: I = None
        self.x: D = None
        self.s: A = None
        self.w: C = None
        self.q: I = None
        self.o: I = None
        self.z: I = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: F = None
        self.u: J = None
        self.o: H = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: H = None
        self.u: F = None
        self.v: E = None
        self.x: C = None
        self.w: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: G = None
        self.t: B = None
        self.y: D = None
        self.txt = txt

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

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