class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: H = None
        self.t: C = None
        self.x: C = None
        self.v: J = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: F = None
        self.s: A = None
        self.x: A = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: A = None
        self.y: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: B = None
        self.v: H = None
        self.x: A = None
        self.s: F = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: F = None
        self.s: A = None
        self.x: A = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: A = None
        self.y: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: B = None
        self.v: H = None
        self.x: A = None
        self.s: F = None
        self.o: A = None
        self.txt = txt

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

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