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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: G = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: G = None
        self.y: G = None
        self.t: J = None
        self.s: C = None
        self.x: G = None
        self.r: H = None
        self.v: G = None
        self.txt = txt

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

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

e.r = f
e.v = f
e.o = b
e.s = b
e.q = b
e.u = b
e.y = k
e.x = l
e.z = j
d.o = m
h.w = f
h.q = f
h.y = e
h.t = e
h.x = e
h.o = e
h.z = e
h.r = a
h.v = a
h.u = k
l.v = j
j.s = d
j.x = f
j.q = l
a.p = l
a.w = b
f.w = l
b.u = d
b.s = h
b.y = h
b.r = m
b.t = m
b.v = f
b.q = k
b.w = l
b.x = e
m.u = j
m.p = f
m.y = f
m.x = f
m.v = f
m.t = k
m.s = h
m.r = b
k.s = a
k.x = f
k.o = j
assert b.v.w.v.q.v.txt == "
class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: H = None
        self.s: H = None
        self.y: J = None
        self.q: H = None
        self.u: H = None
        self.x: D = None
        self.v: G = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: G = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: G = None
        self.y: G = None
        self.t: J = None
        self.s: C = None
        self.x: G = None
        self.r: H = None
        self.v: G = None
        self.txt = txt

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

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

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