class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: I = None
        self.u: E = None
        self.w: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: B = None
        self.u: H = None
        self.r: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: H = None
        self.z: D = None
        self.y: G = None
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: B = None
        self.y: C = None
        self.z: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: C = None
        self.u: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: B = None
        self.u: H = None
        self.r: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: H = None
        self.z: D = None
        self.y: G = None
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: B = None
        self.y: C = None
        self.z: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: C = None
        self.u: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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