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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: J = None
        self.w: F = None
        self.p: G = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: D = None
        self.z: D = None
        self.p: B = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: H = None
        self.w: A = None
        self.p: G = None
        self.o: E = None
        self.x: H = None
        self.u: J = None
        self.r: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: C = None
        self.y: H = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: G = None
        self.o: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: J = None
        self.w: F = None
        self.p: G = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: D = None
        self.z: D = None
        self.p: B = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: H = None
        self.w: A = None
        self.p: G = None
        self.o: E = None
        self.x: H = None
        self.u: J = None
        self.r: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: C = None
        self.y: H = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: G = None
        self.o: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: C = None
        self.txt = txt

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

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