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

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: H = None
        self.p: G = None
        self.v: C = None
        self.w: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.t: E = None
        self.z: C = None
        self.u: D = None
        self.y: C = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: J = None
        self.v: F = None
        self.t: B = None
        self.w: D = None
        self.q: I = None
        self.r: F = None
        self.x: I = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: G = None
        self.p: A = None
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: H = None
        self.p: G = None
        self.v: C = None
        self.w: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.t: E = None
        self.z: C = None
        self.u: D = None
        self.y: C = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: J = None
        self.v: F = None
        self.t: B = None
        self.w: D = None
        self.q: I = None
        self.r: F = None
        self.x: I = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: G = None
        self.p: A = None
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: A = None
        self.txt = txt

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

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