class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: G = None
        self.v: C = None
        self.w: D = None
        self.y: D = None
        self.q: F = None
        self.t: B = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: F = None
        self.x: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: G = None
        self.q: I = None
        self.y: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: J = None
        self.w: B = None
        self.v: I = None
        self.s: J = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: A = None
        self.p: D = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: J = None
        self.q: H = None
        self.s: B = None
        self.t: F = None
        self.z: D = None
        self.u: E = None
        self.x: C = None
        self.v: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: F = None
        self.x: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: G = None
        self.q: I = None
        self.y: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: J = None
        self.w: B = None
        self.v: I = None
        self.s: J = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: A = None
        self.p: D = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: J = None
        self.q: H = None
        self.s: B = None
        self.t: F = None
        self.z: D = None
        self.u: E = None
        self.x: C = None
        self.v: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: A = None
        self.txt = txt

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

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