class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: J = None
        self.u: B = None
        self.w: H = None
        self.q: H = None
        self.o: F = None
        self.p: J = None
        self.s: I = None
        self.r: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: G = None
        self.r: I = None
        self.y: G = None
        self.o: B = None
        self.p: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: H = None
        self.w: B = None
        self.v: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: B = None
        self.p: C = None
        self.t: E = None
        self.r: G = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: G = None
        self.r: I = None
        self.y: G = None
        self.o: B = None
        self.p: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: H = None
        self.w: B = None
        self.v: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: B = None
        self.p: C = None
        self.t: E = None
        self.r: G = None
        self.q: C = None
        self.txt = txt

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

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