class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: H = None
        self.x: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: E = None
        self.w: G = None
        self.r: H = None
        self.v: D = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: B = None
        self.p: B = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: A = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: B = None
        self.s: I = None
        self.w: A = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: A = None
        self.r: D = None
        self.w: E = None
        self.p: G = None
        self.s: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: E = None
        self.w: G = None
        self.r: H = None
        self.v: D = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: B = None
        self.p: B = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: A = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: B = None
        self.s: I = None
        self.w: A = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: A = None
        self.r: D = None
        self.w: E = None
        self.p: G = None
        self.s: F = None
        self.txt = txt

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

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

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